From: Wolfgang Bumiller Date: Thu, 17 Jan 2013 16:36:06 +0000 (+0100) Subject: When not actually executing, don't complain about invalid progs.dat versions for... X-Git-Tag: before-library~237 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=06f53b1a286f0a901237775eeaa167fd5f3f01e5;p=xonotic%2Fgmqcc.git When not actually executing, don't complain about invalid progs.dat versions for now. --- diff --git a/exec.c b/exec.c index f4c9ecf..101901d 100644 --- a/exec.c +++ b/exec.c @@ -51,7 +51,7 @@ static void qcvmerror(qc_program *prog, const char *fmt, ...) putchar('\n'); } -qc_program* prog_load(const char *filename) +qc_program* prog_load(const char *filename, bool skipversion) { qc_program *prog; prog_header header; @@ -66,7 +66,7 @@ qc_program* prog_load(const char *filename) return NULL; } - if (header.version != 6) { + if (!skipversion && header.version != 6) { loaderror("header says this is a version %i progs, we need version 6\n", header.version); file_close(file); return NULL; @@ -1080,7 +1080,7 @@ int main(int argc, char **argv) exit(1); } - prog = prog_load(progsfile); + prog = prog_load(progsfile, noexec); if (!prog) { printf("failed to load program '%s'\n", progsfile); exit(1); diff --git a/gmqcc.h b/gmqcc.h index a6053a6..94a4bf6 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -975,7 +975,7 @@ typedef struct qc_program_s { int argc; /* current arg count for debugging */ } qc_program; -qc_program* prog_load(const char *filename); +qc_program* prog_load(const char *filename, bool ignoreversion); void prog_delete(qc_program *prog); bool prog_exec(qc_program *prog, prog_section_function *func, size_t flags, long maxjumps);