Fix Mod4::write (#99)

Fixes issue #98
This commit is contained in:
Sp00ph 2020-12-30 02:52:12 +01:00 committed by GitHub
parent 51c870281c
commit 6deff3d49e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -209,7 +209,7 @@ impl Mode4 {
.index_unchecked(rounded_down_index)
.cast::<u16>()
};
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));