1
0
This commit is contained in:
otya128
2017-07-10 19:52:56 +09:00
parent 9b3d57759d
commit 165a352ce5

View File

@@ -412,6 +412,7 @@ class VM
static Name parse(wstring input) static Name parse(wstring input)
{ {
import std.array; import std.array;
input = std.uni.toUpper(input);
sizediff_t index = input.indexOf(':'); sizediff_t index = input.indexOf(':');
if (index == -1) if (index == -1)
{ {
@@ -2090,15 +2091,16 @@ class RestoreExprCode : Code
vm.pop(label); vm.pop(label);
if(!label.isString) if(!label.isString)
throw new TypeMismatch(); throw new TypeMismatch();
if (label.castDString in datatable.label) wstring l = std.uni.toUpper(label.castDString);
if (l in datatable.label)
{ {
vm.currentData.table = datatable; vm.currentData.table = datatable;
vm.currentData.index = datatable.label[label.castDString]; vm.currentData.index = datatable.label[l];
} }
else if (label.castDString in vm.currentSlot.globalData.table.label) else if (l in vm.currentSlot.globalData.table.label)
{ {
vm.currentData.table = vm.currentSlot.globalData.table; vm.currentData.table = vm.currentSlot.globalData.table;
vm.currentData.index = vm.currentSlot.globalData.table.label[label.castDString]; vm.currentData.index = vm.currentSlot.globalData.table.label[l];
} }
else else
{ {