assemble.c
changeset 536 5af65fe6e917
parent 524 03eea2f0762c
child 562 c9a2bc5129c9
--- a/assemble.c	Mon Feb 02 22:56:13 2009 -0500
+++ b/assemble.c	Tue Feb 03 00:31:34 2009 -0500
@@ -24,8 +24,16 @@
     int retval = 0;
 
     pd = MOJOSHADER_assemble(buf, NULL, 0, NULL, 0, NULL, NULL, NULL);
-    if (pd->error != NULL)
-        printf("ERROR: (line %d) %s\n", pd->error_position, pd->error);
+    if (pd->error_count > 0)
+    {
+        int i;
+        for (i = 0; i < pd->error_count; i++)
+        {
+            printf("ERROR: (line %d) %s\n",
+                    pd->errors[i].error_position,
+                    pd->errors[i].error);
+        } // for
+    } // if
     else
     {
         if (pd->output != NULL)