6 Nov
2023
6 Nov
'23
3:40 p.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/tpf.c:
+ + set_u32(buffer, offset, value); + ctx->raw_section_used += sizeof(value); + return ret; +} + +static uint32_t fx_put_raw_string(struct vkd3d_bytecode_buffer *buffer, struct fx_context *ctx, const char *string) +{ + uint32_t ret = ctx->raw_section_used; + size_t size; + + /* Empty strings are using the same 4 bytes at the start of the section. */ + if (!string) + return 0; + + size = strlen(string) + 1; I guess the `+ 1` is for the string terminator. However, you're also adding it inside `set_string()`. Is that intended?
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/443#note_51085