Minor OP_NEWARRAY fix

This commit is contained in:
CPunch 2021-01-24 20:33:37 -06:00
parent 336e57e269
commit 0be6e7dff1
1 changed files with 1 additions and 1 deletions

View File

@ -679,7 +679,7 @@ int cosmoV_execute(CState *state) {
val = cosmoV_getTop(state, i + 1);
// set key/value pair
CValue *newVal = cosmoT_insert(state, &newObj->tbl, cosmoV_newNumber(i));
CValue *newVal = cosmoT_insert(state, &newObj->tbl, cosmoV_newNumber(pairs - i - 1));
*newVal = *val;
}