From 28280a4c443c55a4e1689a151e5ca2cdf699b184 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 9 Nov 2017 14:51:10 +0100 Subject: [PATCH] Increment the number of tokens found after the array storage. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- lexer/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.34.1