1
0

support Local GotoExpr

This commit is contained in:
otya128
2016-12-04 13:53:11 +09:00
parent aeffd8b9f8
commit f181f50e91

View File

@@ -838,8 +838,13 @@ class GotoExpr : Code
{ {
Value label; Value label;
vm.pop(label); vm.pop(label);
if(!label.isString) if(label.isString)
{ {
if (sc && sc.func)
{
vm.pc = sc.func.label[label.castString] - 1;
return;
}
vm.pc = vm.currentSlot.globalLabel[label.castString] - 1; vm.pc = vm.currentSlot.globalLabel[label.castString] - 1;
} }
else else