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:
Kacper Michajłow 2023-09-18 15:44:53 +02:00 committed by Dudemanguy
parent b9b58f122b
commit 7e18a46ec2
1 changed files with 1 additions and 1 deletions

View File

@ -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) });