From f44429ce5decc663660ca05be22137e0beb2a666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Mon, 3 Jun 2024 23:04:30 +0500 Subject: [PATCH] Initialize previously uninitialized values --- src/parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/parser.c b/src/parser.c index c9d2014..34a221d 100644 --- a/src/parser.c +++ b/src/parser.c @@ -98,6 +98,7 @@ struct SyntaxElement* parse(FILE* file) { if (symbol == '"') { if (string == NULL) { string = malloc(sizeof(struct Extstring)); + string->next = NULL; } instring = false; syntaxtree->type = STRING; @@ -110,6 +111,7 @@ struct SyntaxElement* parse(FILE* file) { if (string == NULL) { string = malloc(sizeof(struct Extstring)); string->symbol = symbol; + string->next = NULL; continue; } es_addsymbol(string, symbol); @@ -158,6 +160,7 @@ struct SyntaxElement* parse(FILE* file) { default: token = malloc(sizeof(struct Extstring)); token->symbol = symbol; + token->next = NULL; intoken = true; break; }