glsl: move declaration before code
authorBrian Paul <brianp@vmware.com>
Thu, 15 Jan 2009 14:04:36 +0000 (07:04 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 15 Jan 2009 14:05:30 +0000 (07:05 -0700)
src/mesa/shader/slang/slang_compile.c

index 04fa2e0f9318e936a5b1e97ec96d14d076da23d4..818b90b7a8618918f2a0af38b77a63c5514c4409 100644 (file)
@@ -1471,9 +1471,9 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
                   RETURN0;
                }
                else {
-                  array_constructor = GL_TRUE;
                   /* parse the array constructor size */
                   slang_operation array_size;
+                  array_constructor = GL_TRUE;
                   slang_operation_construct(&array_size);
                   if (!parse_expression(C, O, &array_size)) {
                      slang_operation_destruct(&array_size);