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; }