1
0

Fix RESTORE...?

This commit is contained in:
otya128
2016-12-06 18:47:02 +09:00
parent b2b9779eea
commit 55fc5c169b
2 changed files with 25 additions and 1 deletions

View File

@@ -1236,7 +1236,15 @@ class Compiler
if(c.type == CodeType.RestoreCodeS)
{
auto restore = cast(RestoreCodeS)c;
code[i] = new RestoreCode(s.data.label[restore.label], s.data);
auto label = s.data.label.get(restore.label, int.min);
if (label != int.min)
{
code[i] = new RestoreUndefinedLabelCode(restore.label);
}
else
{
code[i] = new RestoreCode(label, s.data);
}
}
}
genCode(new EndVM());