Determine constant arrays before setting any local pointers. Safety first! trunk
authorRyan C. Gordon <icculus@icculus.org>
Wed, 02 Jul 2008 15:44:51 -0400
branchtrunk
changeset 418 54a98b5f6c16
parent 417 af88f2be9bf1
child 419 8c4cee0c6a82
Determine constant arrays before setting any local pointers. Safety first!
mojoshader.c
--- a/mojoshader.c	Wed Jul 02 15:21:36 2008 -0400
+++ b/mojoshader.c	Wed Jul 02 15:44:51 2008 -0400
@@ -7210,12 +7210,12 @@
     // !!! FIXME:  DCL'd before use (default to 2d?). We aren't checking
     // !!! FIXME:  this at the moment, though.
 
+    determine_constants_arrays(ctx);  // in case this hasn't been called yet.
+
     RegisterList *uitem = &ctx->uniforms;
     RegisterList *prev = &ctx->used_registers;
     RegisterList *item = prev->next;
 
-    determine_constants_arrays(ctx);  // in case this hasn't been called yet.
-
     while (item != NULL)
     {
         RegisterList *next = item->next;