Fix RESTORE

This commit is contained in:
otya128 committed 2016-12-15 00:32:30 +09:00
1 parent 18ff3016e6
commit ec0579e110
1 file changed
+11
+11
View File
@@ -1719,8 +1719,19 @@ class RestoreExprCode : Code
vm.pop(label);
if(!label.isString)
throw new TypeMismatch();
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)
{
return "restore expr";