From: Dale Weiler Date: Fri, 21 Jun 2013 23:16:00 +0000 (+0000) Subject: Fix some bugs X-Git-Tag: v0.3.0~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=125d039e3d2ee0779a1329f8767a0993e294a45f;p=xonotic%2Fgmqcc.git Fix some bugs --- diff --git a/exec.c b/exec.c index 05d6d8d..dccee5e 100644 --- a/exec.c +++ b/exec.c @@ -56,7 +56,7 @@ qc_program* prog_load(const char *filename, bool skipversion) { qc_program *prog; prog_header header; - FILE *file = fs_file_open(filename, "rb"); + FILE *file = fs_file_open(filename, "rb"); if (!file) return NULL; @@ -144,6 +144,8 @@ error: vec_free(prog->entitydata); vec_free(prog->entitypool); mem_d(prog); + + fs_file_close(file); return NULL; } diff --git a/parser.c b/parser.c index 03b8a86..14f7803 100644 --- a/parser.c +++ b/parser.c @@ -6303,8 +6303,9 @@ parser_t *parser_create() vec_push(parser->correct_variables, correct_trie_new()); vec_push(parser->correct_variables_score, NULL); - empty_ctx.file = ""; - empty_ctx.line = 0; + empty_ctx.file = ""; + empty_ctx.line = 0; + empty_ctx.column = 0; parser->nil = ast_value_new(empty_ctx, "nil", TYPE_NIL); parser->nil->cvq = CV_CONST; if (OPTS_FLAG(UNTYPED_NIL))