Fix for some bugs noticed with ints.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@700 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-30 12:47:43 +00:00
parent 2c17e2ca4d
commit b0a54a31c4

View file

@ -1182,17 +1182,6 @@ QCC_def_t *QCC_PR_Statement ( QCC_opcode_t *op, QCC_def_t *var_a, QCC_def_t *var
QCC_dstatement_t *statement;
QCC_def_t *var_c=NULL, *temp=NULL;
if (var_a)
{
var_a->references++;
QCC_FreeTemp(var_a);
}
if (var_b)
{
var_b->references++;
QCC_FreeTemp(var_b);
}
if (outstatement == (QCC_dstatement_t **)0xffffffff)
outstatement = NULL;
else if (op->priority != -1)
@ -1221,6 +1210,17 @@ QCC_def_t *QCC_PR_Statement ( QCC_opcode_t *op, QCC_def_t *var_a, QCC_def_t *var
}
}
if (var_a)
{
var_a->references++;
QCC_FreeTemp(var_a);
}
if (var_b)
{
var_b->references++;
QCC_FreeTemp(var_b);
}
if (keyword_class && var_a && var_b)
{
if (var_a->type->type == ev_entity && var_b->type->type == ev_entity)
@ -3603,6 +3603,8 @@ reloop:
default:
QCC_PR_ParseError(ERR_INTERNAL, "Bad field type");
return d;
case ev_integer:
return QCC_PR_Statement(&pr_opcodes[OP_LOAD_I], d, field, NULL);
case ev_field:
d = QCC_PR_Statement(&pr_opcodes[OP_LOAD_FLD], d, field, NULL);
nd = (void *)qccHunkAlloc (sizeof(QCC_def_t));