From ead41e0ffbdaaf79d0d05912410929074aa90bf8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 3 Feb 2009 04:09:25 -0500 Subject: [PATCH] Fixed allocation bug. --- mojoshader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index ac11e768..97618b03 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -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;