mojoshader_assembler.c
changeset 478 af4bfa5d615c
parent 477 e8c74c310a11
child 479 f7beff48de5e
--- a/mojoshader_assembler.c	Wed Dec 10 03:50:16 2008 -0500
+++ b/mojoshader_assembler.c	Wed Dec 10 03:51:01 2008 -0500
@@ -220,7 +220,7 @@
             ch = '\n';
         } // else if
 
-        if ((ch > '0') && (ch < '9'))
+        if ((ch >= '0') && (ch <= '9'))
         {
             // starting a number, but rest of current token was not number.
             if ((idx > 0) && ((ctx->prevchar < '0') || (ctx->prevchar > '9')))
@@ -232,7 +232,7 @@
         else
         {
             // starting a non-number, but rest of current token was numbers.
-            if ((idx > 0) && ((ctx->prevchar >= '0') || (ctx->prevchar <= '9')))
+            if ((idx > 0) && ((ctx->prevchar >= '0') && (ctx->prevchar <= '9')))
             {
                 ctx->token[idx++] = '\0';
                 return NOFAIL;
@@ -249,7 +249,7 @@
                 {
                     ctx->token[idx++] = ch;
                     ctx->source++;
-                    if ((ch == '/') && (ctx->source[1] == '/'))
+                    if ((ch == '/') && (*ctx->source == '/'))
                     {
                         ctx->token[idx++] = '/';
                         ctx->source++;