Fix bugs in ProgramIO and AstIO

This commit is contained in:
konsoletyper 2014-09-10 20:02:48 +04:00
parent fb424e6741
commit e28771ad48
2 changed files with 5 additions and 1 deletions

View File

@ -642,7 +642,7 @@ public class AstIO {
if (exceptionTypeIndex >= 0) {
stmt.setExceptionType(symbolTable.at(exceptionTypeIndex));
}
int exceptionVarIndex = input.readInt();
int exceptionVarIndex = input.readShort();
if (exceptionVarIndex >= 0) {
stmt.setExceptionVariable(exceptionVarIndex);
}

View File

@ -761,6 +761,10 @@ public class ProgramIO {
ConstructMultiArrayInstruction insn = new ConstructMultiArrayInstruction();
insn.setReceiver(program.variableAt(input.readShort()));
insn.setItemType(ValueType.parse(symbolTable.at(input.readInt())));
int dimensionCount = input.readByte();
for (int i = 0; i < dimensionCount; ++i) {
insn.getDimensions().add(program.variableAt(input.readShort()));
}
return insn;
}
case 24: {