mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
Fix some bugs
This commit is contained in:
parent
6db2e69f9a
commit
125d039e3d
2 changed files with 6 additions and 3 deletions
4
exec.c
4
exec.c
|
@ -56,7 +56,7 @@ qc_program* prog_load(const char *filename, bool skipversion)
|
||||||
{
|
{
|
||||||
qc_program *prog;
|
qc_program *prog;
|
||||||
prog_header header;
|
prog_header header;
|
||||||
FILE *file = fs_file_open(filename, "rb");
|
FILE *file = fs_file_open(filename, "rb");
|
||||||
|
|
||||||
if (!file)
|
if (!file)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -144,6 +144,8 @@ error:
|
||||||
vec_free(prog->entitydata);
|
vec_free(prog->entitydata);
|
||||||
vec_free(prog->entitypool);
|
vec_free(prog->entitypool);
|
||||||
mem_d(prog);
|
mem_d(prog);
|
||||||
|
|
||||||
|
fs_file_close(file);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
5
parser.c
5
parser.c
|
@ -6303,8 +6303,9 @@ parser_t *parser_create()
|
||||||
vec_push(parser->correct_variables, correct_trie_new());
|
vec_push(parser->correct_variables, correct_trie_new());
|
||||||
vec_push(parser->correct_variables_score, NULL);
|
vec_push(parser->correct_variables_score, NULL);
|
||||||
|
|
||||||
empty_ctx.file = "<internal>";
|
empty_ctx.file = "<internal>";
|
||||||
empty_ctx.line = 0;
|
empty_ctx.line = 0;
|
||||||
|
empty_ctx.column = 0;
|
||||||
parser->nil = ast_value_new(empty_ctx, "nil", TYPE_NIL);
|
parser->nil = ast_value_new(empty_ctx, "nil", TYPE_NIL);
|
||||||
parser->nil->cvq = CV_CONST;
|
parser->nil->cvq = CV_CONST;
|
||||||
if (OPTS_FLAG(UNTYPED_NIL))
|
if (OPTS_FLAG(UNTYPED_NIL))
|
||||||
|
|
Loading…
Reference in a new issue