From 6136cad7867af917dbd79646893e8f048f361c5b Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 27 Aug 2021 04:29:31 +0000 Subject: [PATCH] Fix #merge bug. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6044 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qccmain.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/engine/qclib/qccmain.c b/engine/qclib/qccmain.c index a0910b73..ea2ae2b7 100644 --- a/engine/qclib/qccmain.c +++ b/engine/qclib/qccmain.c @@ -1631,7 +1631,7 @@ static const char *QCC_FunctionForStatement(int st) { if (st < functions[i].code) break; - ret = functions[i].filen; + ret = functions[i].name; } } return ret; @@ -3003,6 +3003,15 @@ static void QCC_MergeStatements16(dstatement16_t *in, unsigned int num) out->c.cast = NULL; out->c.ofs = in->c; out->linenum = 0; + if (in->op < OP_NUMREALOPS) + { + if (!pr_opcodes[in->op].type_a) + out->a.ofs = (short)in->a; + if (!pr_opcodes[in->op].type_b) + out->b.ofs = (short)in->b; + if (!pr_opcodes[in->op].type_c) + out->c.ofs = (short)in->c; + } } out->op = OP_DONE;