Initialize previously uninitialized values
This commit is contained in:
parent
0afd640dcc
commit
f44429ce5d
@ -98,6 +98,7 @@ struct SyntaxElement* parse(FILE* file) {
|
|||||||
if (symbol == '"') {
|
if (symbol == '"') {
|
||||||
if (string == NULL) {
|
if (string == NULL) {
|
||||||
string = malloc(sizeof(struct Extstring));
|
string = malloc(sizeof(struct Extstring));
|
||||||
|
string->next = NULL;
|
||||||
}
|
}
|
||||||
instring = false;
|
instring = false;
|
||||||
syntaxtree->type = STRING;
|
syntaxtree->type = STRING;
|
||||||
@ -110,6 +111,7 @@ struct SyntaxElement* parse(FILE* file) {
|
|||||||
if (string == NULL) {
|
if (string == NULL) {
|
||||||
string = malloc(sizeof(struct Extstring));
|
string = malloc(sizeof(struct Extstring));
|
||||||
string->symbol = symbol;
|
string->symbol = symbol;
|
||||||
|
string->next = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
es_addsymbol(string, symbol);
|
es_addsymbol(string, symbol);
|
||||||
@ -158,6 +160,7 @@ struct SyntaxElement* parse(FILE* file) {
|
|||||||
default:
|
default:
|
||||||
token = malloc(sizeof(struct Extstring));
|
token = malloc(sizeof(struct Extstring));
|
||||||
token->symbol = symbol;
|
token->symbol = symbol;
|
||||||
|
token->next = NULL;
|
||||||
intoken = true;
|
intoken = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user