fix a bug of EVAL

This commit is contained in:
blueloveTH 2022-11-09 19:33:31 +08:00
parent 4c27b5210b
commit 21a0314b1a

View File

@ -393,10 +393,10 @@ public:
}
if(frame->code->src->mode == EVAL_MODE) {
if(frame->stackSize() != 1) {
systemError("stack size is not 1 in EVAL_MODE");
}
return frame->popValue(this);
if(frame->stackSize() != 1) systemError("stack size is not 1 in EVAL_MODE");
PyVar ret = frame->popValue(this);
callstack.pop();
return ret;
}
if(frame->stackSize() != 0) systemError("stack not empty in EXEC_MODE");