From 5631d2b367d4be22750b4c4f0510e5354ed254de Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Wed, 28 Oct 2020 14:01:40 +0000 Subject: [PATCH] (Dr. Mario Fixes) Correct out of range crash when palette selection is anything but zero. Signed-off-by: Adrian Conlon --- LR35902/inc/ObjectAttribute.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LR35902/inc/ObjectAttribute.h b/LR35902/inc/ObjectAttribute.h index e0c3298..9e4b562 100644 --- a/LR35902/inc/ObjectAttribute.h +++ b/LR35902/inc/ObjectAttribute.h @@ -25,7 +25,7 @@ namespace EightBit { auto lowPriority() const { return !priority(); } auto flipY() const { return !!(flags() & Chip::Bit6); } auto flipX() const { return !!(flags() & Chip::Bit5); } - auto palette() const { return (flags() & Chip::Bit4) >> 3; } + auto palette() const { return (flags() & Chip::Bit4) >> 4; } private: uint8_t m_positionY;