From 6deff3d49e4a93d6d859dc24c5a542f051eff725 Mon Sep 17 00:00:00 2001 From: Sp00ph <61327188+Sp00ph@users.noreply.github.com> Date: Wed, 30 Dec 2020 02:52:12 +0100 Subject: [PATCH] Fix Mod4::write (#99) Fixes issue #98 --- src/vram/bitmap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vram/bitmap.rs b/src/vram/bitmap.rs index 0dc8606..f21919a 100644 --- a/src/vram/bitmap.rs +++ b/src/vram/bitmap.rs @@ -209,7 +209,7 @@ impl Mode4 { .index_unchecked(rounded_down_index) .cast::() }; - if real_index == rounded_down_index { + if real_index != rounded_down_index { // even byte, change the high bits let old_val = address.read(); address.write((old_val & 0xFF) | ((pal8bpp as u16) << 8));