29 Aug
2023
29 Aug
'23
9:03 a.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.c:
ctx->result = VKD3D_ERROR_NOT_IMPLEMENTED; }
+char *hlsl_sprintf_alloc(struct hlsl_ctx *ctx, const char *fmt, ...) +{ + struct vkd3d_string_buffer *string; + va_list args; + char *ret; + + if (!(string = hlsl_get_string_buffer(ctx))) + return NULL; + va_start(args, fmt); + vkd3d_string_buffer_vprintf(string, fmt, args);
I guess if this fails an incomplete buffer is returned. Maybe we should return `NULL` and set the context result in that case. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/310#note_43653