Fix #merge bug.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6044 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-08-27 04:29:31 +00:00
parent a8d606e042
commit 6136cad786

View file

@ -1631,7 +1631,7 @@ static const char *QCC_FunctionForStatement(int st)
{ {
if (st < functions[i].code) if (st < functions[i].code)
break; break;
ret = functions[i].filen; ret = functions[i].name;
} }
} }
return ret; return ret;
@ -3003,6 +3003,15 @@ static void QCC_MergeStatements16(dstatement16_t *in, unsigned int num)
out->c.cast = NULL; out->c.cast = NULL;
out->c.ofs = in->c; out->c.ofs = in->c;
out->linenum = 0; 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; out->op = OP_DONE;