mojoshader_compiler.c
changeset 981 bfcdebd39e5b
parent 980 83e96d285449
child 982 97d3ff546b26
--- a/mojoshader_compiler.c	Tue Jan 18 00:32:15 2011 -0500
+++ b/mojoshader_compiler.c	Tue Jan 18 10:42:25 2011 -0800
@@ -2321,9 +2321,7 @@
                 } // if
 
                 const int swizlen = (int) strlen(member);
-                if (swizlen == veclen)
-                    datatype = reduced;
-                else
+                if (swizlen != veclen)
                 {
                     const char *typestr = NULL;
                     switch (reduced->vector.base->type)
@@ -2341,7 +2339,7 @@
                     snprintf(buf, sizeof (buf), "%s%d", typestr, swizlen);
                     datatype = get_usertype(ctx, buf);
                     assert(datatype != NULL);
-                } // else
+                } // if
 
                 ast->derefstruct.datatype = datatype;
                 return ast->derefstruct.datatype;