1
0
Fork 0
forked from fte/fteqw

Yes Blub, I suck.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3026 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-07-17 07:41:59 +00:00
parent c29cf3db99
commit 7c6f37c4ae

View file

@ -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;