(zilch magic): fix off-by-one when replacing the end of the string
This commit is contained in:
parent
6e4d191145
commit
99bb2501e3
1 changed files with 1 additions and 1 deletions
|
|
@ -282,7 +282,7 @@
|
||||||
(define parts '())
|
(define parts '())
|
||||||
(let find-part-at ((i 0) (last-i 0))
|
(let find-part-at ((i 0) (last-i 0))
|
||||||
(let ((next-slash (bytestring-index str (lambda (c) (= c #x2F)) i)))
|
(let ((next-slash (bytestring-index str (lambda (c) (= c #x2F)) i)))
|
||||||
(if (or (not next-slash) (>= next-slash (- (bytevector-length str) 53)))
|
(if (or (not next-slash) (> next-slash (- (bytevector-length str) 53)))
|
||||||
(if (= last-i 0)
|
(if (= last-i 0)
|
||||||
(set! parts #f)
|
(set! parts #f)
|
||||||
(set! parts (cons (bytevector-copy str last-i) parts)))
|
(set! parts (cons (bytevector-copy str last-i) parts)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue