From: Jérôme Benoit Date: Thu, 9 Nov 2017 13:51:10 +0000 (+0100) Subject: Increment the number of tokens found after the array storage. X-Git-Url: https://git.piment-noir.org/?p=TP_AL_C.git;a=commitdiff_plain;h=28280a4c443c55a4e1689a151e5ca2cdf699b184 Increment the number of tokens found after the array storage. Signed-off-by: Jérôme Benoit --- diff --git a/lexer/main.c b/lexer/main.c index db41495..19fc34f 100644 --- a/lexer/main.c +++ b/lexer/main.c @@ -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));