diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index da16eb22e..42593a875 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -843,10 +843,14 @@ int Thumbulator::execute() #endif Op decodedOp; +#ifndef UNSAFE_OPTIMIZATIONS if ((instructionPtr & 0xF0000000) == 0 && instructionPtr < romSize) - decodedOp = decodedRom[instructionPtr / 2]; + decodedOp = decodedRom[instructionPtr >> 1]; else decodedOp = decodeInstructionWord(inst); +#else + decodedOp = decodedRom[instructionPtr >> 1]; +#endif switch (decodedOp) { //ADC