From 7c6f37c4ae392cc56c2ca1344106ac3ef8f677ce Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 17 Jul 2008 07:41:59 +0000 Subject: [PATCH] Yes Blub, I suck. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3026 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_comp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index c717aaefd..b637e9d38 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -6841,12 +6841,13 @@ void QCC_PR_EmitArrayGetFunction(QCC_def_t *scope, char *arrayname) QCC_PR_Statement(pr_opcodes+OP_IFNOT, fasttrackpossible, NULL, &st); //fetch_gbl takes: (float size, variant array[]), float index, variant pos //note that the array size is coded into the globals, one index before the array. -// def->ofs--; + if (def->type->size >= 3) QCC_PR_Statement3(&pr_opcodes[OP_FETCH_GBL_V], def, index, &def_ret, true); else QCC_PR_Statement3(&pr_opcodes[OP_FETCH_GBL_F], def, index, &def_ret, true); -// def->ofs++; + + QCC_PR_Statement(&pr_opcodes[OP_RETURN], &def_ret, NULL, NULL); //finish the jump st->b = &statements[numstatements] - st; @@ -7007,6 +7008,7 @@ void QCC_PR_EmitArraySetFunction(QCC_def_t *scope, char *arrayname) QCC_PR_Statement3(&pr_opcodes[OP_STOREP_V], value, index, NULL, true); //*b = a else QCC_PR_Statement3(&pr_opcodes[OP_STOREP_F], value, index, NULL, true); + QCC_PR_Statement(&pr_opcodes[OP_RETURN], value, NULL, NULL); //finish the jump st->b = &statements[numstatements] - st;