Initialize previously uninitialized values

This commit is contained in:
bʰedoh₂ swé 2024-06-03 23:04:30 +05:00
parent 0afd640dcc
commit f44429ce5d

View File

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