Skip to content

Commit

Permalink
Fix shuffling in emulation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Aug 18, 2022
1 parent 054995d commit e08a6ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Processor/Instruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,12 @@ bool Instruction::get_offline_data_usage(DataPositions& usage)
case USE_INP:
if (r[0] >= N_DATA_FIELD_TYPE)
throw invalid_program();
if ((unsigned)r[1] >= usage.inputs.size())
throw Processor_Error("Player number too high");
usage.inputs[r[1]][r[0]] = n;
if (usage.inputs.size() != 1)
{
if ((unsigned) r[1] >= usage.inputs.size())
throw Processor_Error("Player number too high");
usage.inputs[r[1]][r[0]] = n;
}
return int(n) >= 0;
case USE_EDABIT:
usage.edabits[{r[0], r[1]}] = n;
Expand Down

0 comments on commit e08a6ad

Please sign in to comment.