Showing the changes to src (1 of 1 file). Show all
Unified · Split
| @@ -40,9 +40,9 @@ assign a b c at o = · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | word16ToSigned :: Word16 -> Int |
| 42 | 42 | word16ToSigned w = |
| 43 | − fromIntegral $ case w `testBit` 15 of | |
| 44 | − False -> w | |
| 45 | − True -> complement $ pred w | |
| 43 | + case w `testBit` 15 of | |
| 44 | + False -> fromIntegral w | |
| 45 | + True -> 0 - (fromIntegral . complement $ pred w) | |
| 46 | 46 | |
| 47 | 47 | word32At :: Word16 -> BS.ByteString -> Word32 |
| 48 | 48 | word32At offset bs = |