correcting an offset error: if the string str is exactly n characters long, the use of string-ref in the last case will die.

This commit is contained in:
Danny Yoo 2011-09-03 20:36:32 -04:00 committed by Robby Findler
parent 83e7f92250
commit 37a81bcfce

View File

@ -112,7 +112,7 @@
;; are eaten in the process.
(define (wrap-to-count str n)
(cond
[(< (string-length str) n) (list str)]
[(<= (string-length str) n) (list str)]
[(regexp-match-positions #rx"\n" str 0 n)
=>
(λ (posn)