vkd3d-shader: Also copy the terminator in vkd3d_shader_message_context_copy_messages().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2020-07-28 14:22:32 +04:30 committed by Alexandre Julliard
parent f6868919d3
commit cd69865b69

View File

@ -120,8 +120,8 @@ static char *vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_mess
{ {
char *messages; char *messages;
if ((messages = vkd3d_malloc(context->messages.content_size))) if ((messages = vkd3d_malloc(context->messages.content_size + 1)))
memcpy(messages, context->messages.buffer, context->messages.content_size); memcpy(messages, context->messages.buffer, context->messages.content_size + 1);
return messages; return messages;
} }