nexttoken() needs to report the ending newline when throwing away comments.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 Dec 2008 03:51:49 -0500
changeset 479 f7beff48de5e
parent 478 af4bfa5d615c
child 480 e7a7822fb38b
nexttoken() needs to report the ending newline when throwing away comments.
mojoshader_assembler.c
--- a/mojoshader_assembler.c	Wed Dec 10 03:51:01 2008 -0500
+++ b/mojoshader_assembler.c	Wed Dec 10 03:51:49 2008 -0500
@@ -360,8 +360,12 @@
             while ((rc = tokenize(ctx)) == NOFAIL)
             {
                 if (strcmp(ctx->token, "\n") == 0)
+                {
+                    pushback(ctx);
                     break;
+                } // if
             } // while
+            continue;  // pick up from newline, go again.
         } // if
 
         break;