1
0

何やっていたか忘れた

This commit is contained in:
otya128
2016-03-26 19:48:56 +09:00
parent 8e1860461a
commit fff9c59dc0
7 changed files with 109 additions and 23 deletions

View File

@@ -34,6 +34,7 @@ class VMSlot
Value[] global;
VMVariable[wstring] globalTable;
Function[wstring] functions;
Function[] functionTable;
int[wstring] globalLabel;
DebugInfo debugInfo;
Value[wstring] directModeVariable;
@@ -78,7 +79,7 @@ class VM
c.global ~= Value(ValueType.Void);
foreach(wstring k, VMVariable v ; globalTable)
{
if(v.index >= 0 && v.index >= oldlen)
if(v.index >= 0 && v.index >= oldlen && v.index < c.global.length)
c.global[v.index] = Value(v.type);
}
}