From 4f5817c0327dd4b2aa812808141f9b8ed637bda9 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 8 Nov 2019 18:45:47 +0000 Subject: [PATCH] Fix topBit always returning False --- src/Mima/Word.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mima/Word.hs b/src/Mima/Word.hs index b9a54ea..353c06a 100644 --- a/src/Mima/Word.hs +++ b/src/Mima/Word.hs @@ -31,7 +31,7 @@ type SmallValue = Word16 type Opcode = Word4 topBit :: (FiniteBits b) => b -> Bool -topBit b = testBit b $ finiteBitSize b +topBit b = testBit b $ finiteBitSize b - 1 bytesToWord :: (Word8, Word8, Word8) -> MimaWord bytesToWord (w1, w2, w3) =