mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
d3d11: don't skip last char in buffer
Both buffers have the same size (32) and if the source is not null terminated it should be fixed there. Copy whole buffer.
This commit is contained in:
parent
b9b58f122b
commit
7e18a46ec2
@ -1598,7 +1598,7 @@ static void save_cached_program(struct ra *ra, struct ra_renderpass *pass,
|
||||
.comp_bytecode_len = comp_bc.len,
|
||||
};
|
||||
memcpy(header.magic, cache_magic, sizeof(header.magic));
|
||||
strncpy(header.compiler, spirv->name, sizeof(header.compiler) - 1);
|
||||
strncpy(header.compiler, spirv->name, sizeof(header.compiler));
|
||||
|
||||
struct bstr *prog = &pass->params.cached_program;
|
||||
bstr_xappend(pass, prog, (bstr){ (char *) &header, sizeof(header) });
|
||||
|
Loading…
Reference in New Issue
Block a user