Skip to content

Commit e08a6ad

Browse files
committed
Fix shuffling in emulation.
1 parent 054995d commit e08a6ad

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Processor/Instruction.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,12 @@ bool Instruction::get_offline_data_usage(DataPositions& usage)
509509
case USE_INP:
510510
if (r[0] >= N_DATA_FIELD_TYPE)
511511
throw invalid_program();
512-
if ((unsigned)r[1] >= usage.inputs.size())
513-
throw Processor_Error("Player number too high");
514-
usage.inputs[r[1]][r[0]] = n;
512+
if (usage.inputs.size() != 1)
513+
{
514+
if ((unsigned) r[1] >= usage.inputs.size())
515+
throw Processor_Error("Player number too high");
516+
usage.inputs[r[1]][r[0]] = n;
517+
}
515518
return int(n) >= 0;
516519
case USE_EDABIT:
517520
usage.edabits[{r[0], r[1]}] = n;

0 commit comments

Comments
 (0)