Skip to content

Commit

Permalink
use the signed version of toInt
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed Dec 16, 2008
1 parent 196cbc2 commit 3e1dfc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bson.sml
Expand Up @@ -169,7 +169,7 @@ struct
fun getInt bytes =
let
val firstFourBytes = List.take (bytes, 4) handle Subscript => raise InternalError
val int = Word32.toInt (PackWord32Little.subVecX (Word8Vector.fromList firstFourBytes, 0))
val int = Word32.toIntX (PackWord32Little.subVecX (Word8Vector.fromList firstFourBytes, 0))
val remainder = List.drop (bytes, 4) handle Subscript => raise InternalError
in
(int, remainder)
Expand Down

0 comments on commit 3e1dfc2

Please sign in to comment.