]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
Check types on + and - operations
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index 2e6114e5493e1ce61876489a9444f5c493d5f8c5..29b3018916b4f93f3f74b5235b7cf108beb05695 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -497,8 +497,6 @@ int lex_do(lex_file *lex)
                case '[':
                case ']':
 
-               case '.':
-
                case '#':
 
                        return (lex->tok->ttype = ch);
@@ -525,13 +523,14 @@ int lex_do(lex_file *lex)
                        case '^':
                        case '~':
                        case ',':
-                               return ch;
+                   case '.':
+                               return (lex->tok->ttype = ch);
                        default:
                                break;
                }
        }
 
-       if (ch == ',') {
+       if (ch == ',' || ch == '.') {
            if (!lex_tokench(lex, ch) ||
                !lex_endtoken(lex))
            {