vkd3d-compiler: Do not overallocate memory for shader code.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2018-08-15 13:57:52 +02:00
committed by Alexandre Julliard
parent 98689bf33c
commit f7a21ad982
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ static bool read_shader(struct vkd3d_shader_code *shader, const char *filename)
return false;
}
if (!(code = malloc(sizeof(uint32_t) * shader->size)))
if (!(code = malloc(shader->size)))
{
fprintf(stderr, "Out of memory.\n");
fclose(fd);