Fix day 17 division instruction (it's just a shift)

This commit is contained in:
Stefan Müller 2025-05-21 20:23:42 +02:00
parent 6d3973bd1e
commit 5201dcf0bc

View File

@ -45,7 +45,7 @@ ChronospatialComputerDivisionInstruction::ChronospatialComputerDivisionInstructi
void ChronospatialComputerDivisionInstruction::runValue(ChronospatialComputerState& state, const int operandValue) const void ChronospatialComputerDivisionInstruction::runValue(ChronospatialComputerState& state, const int operandValue) const
{ {
state.registers[destination_] = state.registers[0] / Math::ipow(2, operandValue); state.registers[destination_] = state.registers[0] >> operandValue;
state.instructionPointer += 2; state.instructionPointer += 2;
} }