mojoshader_assembler.c
changeset 570 af6bb8728f9e
parent 567 1a61d0cf86ba
child 571 f8f81d832fa0
--- a/mojoshader_assembler.c	Thu Feb 12 01:23:39 2009 -0500
+++ b/mojoshader_assembler.c	Thu Feb 12 01:28:06 2009 -0500
@@ -602,10 +602,11 @@
         neednum = 0;
     } // else
 
-    if (neednum)
+    // "c[5]" is the same as "c5", so if the token is done, see if next is '['.
+    if ((neednum) && (ctx->tokenlen == 0))
     {
         if (nexttoken(ctx) == ((Token) '['))
-            neednum = 0;  // "c[5]" is the same as "c5".
+            neednum = 0;  // don't need a number on register name itself.
         pushback(ctx);
     } // if