Fix RESTORE...?

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

No files matched your search

+9 -1
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());