diff --git a/src/cpu.h b/src/cpu.h index c10bde5..85cb025 100644 --- a/src/cpu.h +++ b/src/cpu.h @@ -55,7 +55,7 @@ private: uint8_t peekMemory(int32_t offset = 0) const; uint8_t consumeMemory(); - uint32_t immediate16() { return (consumeMemory() << 8) | consumeMemory(); } + uint32_t immediate16() { return consumeMemory() | (consumeMemory() << 8); } void setBc(uint32_t value); void setDe(uint32_t value);