mojoshader.c
changeset 540 e65090ad5caa
parent 538 cf2872d06e8b
child 541 0240ccafb610
--- a/mojoshader.c	Tue Feb 03 01:56:07 2009 -0500
+++ b/mojoshader.c	Tue Feb 03 04:09:25 2009 -0500
@@ -7092,8 +7092,8 @@
 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;