diff --git a/src/gfx/reverse.cpp b/src/gfx/reverse.cpp index 2054e6e1..30eb97c6 100644 --- a/src/gfx/reverse.cpp +++ b/src/gfx/reverse.cpp @@ -531,7 +531,7 @@ void reverse() { // If vertically mirrored, fetch the bytes from the other end uint8_t realY = (attribute & 0x40 ? 7 - y : y) * options.bitDepth; uint8_t bitplane0 = tileData[realY]; - uint8_t bitplane1 = tileData[realY + 1 % options.bitDepth]; + uint8_t bitplane1 = options.bitDepth == 2 ? tileData[realY + 1] : bitplane0; if (attribute & 0x20) { // Handle horizontal flip bitplane0 = flipTable[bitplane0]; bitplane1 = flipTable[bitplane1];