[MLton-commit] r6636
Matthew Fluet
fluet at mlton.org
Mon Jun 2 07:11:27 PDT 2008
Use unsigned comparison for check of appropriately sized sequences
----------------------------------------------------------------------
U mlton/trunk/basis-library/arrays-and-vectors/sequence.fun
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/arrays-and-vectors/sequence.fun
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/sequence.fun 2008-06-02 14:11:24 UTC (rev 6635)
+++ mlton/trunk/basis-library/arrays-and-vectors/sequence.fun 2008-06-02 14:11:27 UTC (rev 6636)
@@ -139,7 +139,7 @@
if not S.isMutable andalso n = 0
then Array.array0Const ()
else if Primitive.Controls.safe
- andalso (n < 0 orelse n > maxLen')
+ andalso geu (n, maxLen')
then raise Size
else Array.arrayUnsafe n
fun arrayUninit n = arrayUninit' (fromIntForLength n)
More information about the MLton-commit
mailing list