From b0a54a31c4d577d4a47dd5e6bbcc146ac5672745 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 30 Dec 2004 12:47:43 +0000 Subject: [PATCH] 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 --- engine/qclib/qcc_pr_comp.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index 536b95560..50beb68e7 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -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));