use vs->locals in DEF instruction

This commit is contained in:
lyon 2022-02-25 17:35:07 +08:00
parent f3a973c8df
commit 9a6089cbcb

View File

@ -540,7 +540,7 @@ static Arg* VM_instruction_handler_DEF(PikaObj* self, VMState* vs, char* data) {
while (1) { while (1) {
if ((methodPtr[0] == 'B') && if ((methodPtr[0] == 'B') &&
(methodPtr[1] - '0' == thisBlockDeepth + 1)) { (methodPtr[1] - '0' == thisBlockDeepth + 1)) {
class_defineMethod(self, data, (Method)methodPtr); class_defineMethod(vs->locals, data, (Method)methodPtr);
break; break;
} }
offset += __gotoNextLine(methodPtr); offset += __gotoNextLine(methodPtr);