1
0

Fix RESTORE

This commit is contained in:
otya128
2016-12-15 00:31:52 +09:00
parent 18ff3016e6
commit ec0579e110

View File

@@ -1719,7 +1719,18 @@ class RestoreExprCode : Code
vm.pop(label);
if(!label.isString)
throw new TypeMismatch();
datatable.dataIndex = datatable.label[label.stringValue];
if (label.stringValue in datatable.label)
{
datatable.dataIndex = datatable.label[label.stringValue];
}
else if (label.stringValue in vm.currentSlot.globalDataTable.label)
{
datatable.dataIndex = vm.currentSlot.globalDataTable.label[label.stringValue];
}
else
{
throw new UndefinedLabel();
}
}
override string toString(VM vm)
{