racket/snip: fix bug in splitting string snips

This commit is contained in:
Matthew Flatt 2014-11-24 09:08:22 -07:00
parent 51099e660e
commit f02bfbd11e
2 changed files with 12 additions and 2 deletions

View File

@ -648,7 +648,17 @@
(error 'notifications "too weak? ~e" count))
(unless (<= 0 count2 (/ N 2))
(error 'notifications "not weak enough? ~e" count2)))
;; ----------------------------------------
;; make sure splitting a large string snip works:
(void
(send (make-object string-snip% (make-string 100000 #\a))
split
50000
(box #f)
(box #f)))
;; ----------------------------------------
;; No #<unsafe-undefined> checks on certain class instances

View File

@ -529,7 +529,7 @@
(let ([s (string-snip-buffer snip)])
(unless ((string-length s) . >= . position)
(set-string-snip-buffer! s (make-string position))))
(set-string-snip-buffer! snip (make-string position))))
(string-copy! (string-snip-buffer snip)
0