Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- libs/vkd3d-shader/vkd3d_shader_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index c7161e4..7548b90 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -120,8 +120,8 @@ static char *vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_mess { char *messages;
- if ((messages = vkd3d_malloc(context->messages.content_size))) - memcpy(messages, context->messages.buffer, context->messages.content_size); + if ((messages = vkd3d_malloc(context->messages.content_size + 1))) + memcpy(messages, context->messages.buffer, context->messages.content_size + 1);
return messages; }