racket/snip: fix bug in splitting string snips
This commit is contained in:
parent
51099e660e
commit
f02bfbd11e
|
@ -649,6 +649,16 @@
|
||||||
(unless (<= 0 count2 (/ N 2))
|
(unless (<= 0 count2 (/ N 2))
|
||||||
(error 'notifications "not weak enough? ~e" count2)))
|
(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
|
;; No #<unsafe-undefined> checks on certain class instances
|
||||||
|
|
||||||
|
|
|
@ -529,7 +529,7 @@
|
||||||
|
|
||||||
(let ([s (string-snip-buffer snip)])
|
(let ([s (string-snip-buffer snip)])
|
||||||
(unless ((string-length s) . >= . position)
|
(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)
|
(string-copy! (string-snip-buffer snip)
|
||||||
0
|
0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user