mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
don't rewind local variables too far
This commit is contained in:
parent
0c06f9f650
commit
437988c5b4
1 changed files with 2 additions and 4 deletions
6
parser.c
6
parser.c
|
@ -13,8 +13,6 @@ typedef struct {
|
||||||
lex_file *lex;
|
lex_file *lex;
|
||||||
int tok;
|
int tok;
|
||||||
|
|
||||||
int fieldsize;
|
|
||||||
|
|
||||||
MEM_VECTOR_MAKE(varentry_t, globals);
|
MEM_VECTOR_MAKE(varentry_t, globals);
|
||||||
MEM_VECTOR_MAKE(varentry_t, fields);
|
MEM_VECTOR_MAKE(varentry_t, fields);
|
||||||
MEM_VECTOR_MAKE(ast_function*, functions);
|
MEM_VECTOR_MAKE(ast_function*, functions);
|
||||||
|
@ -952,10 +950,10 @@ static ast_block* parser_parse_block(parser_t *parser)
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
parser->blocklocal = oldblocklocal;
|
|
||||||
/* unroll the local vector */
|
|
||||||
while (parser->locals_count > parser->blocklocal)
|
while (parser->locals_count > parser->blocklocal)
|
||||||
parser_pop_local(parser);
|
parser_pop_local(parser);
|
||||||
|
parser->blocklocal = oldblocklocal;
|
||||||
|
/* unroll the local vector */
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue