mojoshader_compiler.c
changeset 1009 ba0ed22a4bac
parent 1007 7bd3a6b86fd7
child 1010 bbfed6061a2e
--- a/mojoshader_compiler.c	Tue Mar 15 01:38:05 2011 -0700
+++ b/mojoshader_compiler.c	Tue Mar 15 01:39:41 2011 -0700
@@ -677,6 +677,7 @@
     retval->identifier = identifier;
     retval->member = member;  // cached; don't copy string.
     retval->isswizzle = 0;  // may change during semantic analysis.
+    retval->member_index = 0;  // set during semantic analysis.
     return (MOJOSHADER_astExpression *) retval;
 } // new_deref_struct_expr
 
@@ -2659,6 +2660,7 @@
                 if (strcmp(mbrs[i].identifier, member) == 0)
                 {
                     ast->derefstruct.datatype = mbrs[i].datatype;
+                    ast->derefstruct.member_index = i;
                     break;
                 } // if
             } // for