Increment the number of tokens found after the array storage.
[TP_AL_C.git] / lexer / main.c
index db41495086b75c03aa4a24683d07a188dabbc429..19fc34f8763db78ec958d8d31b7d4e656090b0c8 100644 (file)
@@ -268,8 +268,8 @@ int main (int argc, char const *argv[]) {
         } else {
             printf ("Token type found: %s\n", tokenTypestr[tokenType]);
         }
-        tokenFound++;
         tokenList[tokenFound] = tokenTypestr[tokenType];
+        tokenFound++;
         // reinit tokenValue
         i = 0;
         memset(tokenValue, 0, sizeof(tokenValue));