Fix byte order when loading memory maps
This commit is contained in:
parent
b6420a34ca
commit
ac5fbf3942
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ instance Bits MimaWord where
|
|||
bytesToWord :: Word8 -> Word8 -> Word8 -> MimaWord
|
||||
bytesToWord w1 w2 w3 =
|
||||
let (w1', w2', w3') = (fromIntegral w1, fromIntegral w2, fromIntegral w3)
|
||||
in fromWord32 $ w1' .|. shiftL w2' 8 .|. shiftL w3' 16
|
||||
in fromWord32 $ shiftL w1' 16 .|. shiftL w2' 8 .|. w3'
|
||||
|
||||
wordToBytes :: MimaWord -> (Word8, Word8, Word8)
|
||||
wordToBytes mw =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue