Skip to content

Commit

Permalink
Fixed allocation bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 3, 2009
1 parent 8d8e3c6 commit ead41e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mojoshader.c
Expand Up @@ -7092,8 +7092,8 @@ static MOJOSHADER_sampler *build_samplers(Context *ctx)
static MOJOSHADER_error *build_errors(Context *ctx)
{
int total = 0;
MOJOSHADER_error *retval;
retval = (MOJOSHADER_error *) Malloc(ctx, sizeof (MOJOSHADER_error));
MOJOSHADER_error *retval = (MOJOSHADER_error *)
Malloc(ctx, sizeof (MOJOSHADER_error) * ctx->error_count);
if (retval == NULL)
return NULL;

Expand Down

0 comments on commit ead41e0

Please sign in to comment.