]> gitweb.factorcode.org Git - factor.git/commitdiff
io.random: Fix off-by-one error.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 23 Oct 2012 23:55:17 +0000 (16:55 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 23 Oct 2012 23:55:17 +0000 (16:55 -0700)
extra/io/random/random.factor

index d9ce6c6838a66071957ca7b68867d52c787f2056..a12574fb4367dbcc4b41e6d3b203394434e91952 100644 (file)
@@ -21,7 +21,7 @@ PRIVATE>
     [| line line# |
         line# random :> r
         r n < [
-            line# n <
+            line# n <=
             [ line r accum insert-nth! ]
             [ line r accum set-nth ] if
         ] when