From 0be6e7dff1ab94c445a178852045ecddd5c56199 Mon Sep 17 00:00:00 2001 From: CPunch Date: Sun, 24 Jan 2021 20:33:37 -0600 Subject: [PATCH] Minor OP_NEWARRAY fix --- src/cvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cvm.c b/src/cvm.c index 1fbda98..f37212e 100644 --- a/src/cvm.c +++ b/src/cvm.c @@ -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; }