-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Line 173 in f892d05
| `(funcall (if (adjustable-array-p ,vector) |
with-simple-vector doesn't check for arrays with fill-pointer, and calls the call-with-array-data/fast for such an array, which goes wrong (at least on LispWorks).
CL-USER 60 > (progn (setq str (make-array 10 :fill-pointer 4 :element-type 'character))
(replace str "docs")
(BABEL:STRING-TO-OCTETS str))
#(244 130 155 134 0 0 0)
It can be fixed by changing the condition to (or (adjustable-array-p ,vector) (array-has-fill-pointer-p ,vector)), and with this it works as expected:
CL-USER 63 > (progn (setq str (make-array 10 :fill-pointer 4 :element-type 'character))
(replace str "docs")
(BABEL:STRING-TO-OCTETS str))
#(100 111 99 115)
you get this problem if you do:
(ql:quickload "quri")
(quri:url-encode (quri:url-encode "docs"))
Because quri:url-encode returns a string with a fill-pointer.
Actually found it in the test of cl-ses4, because it does this double call:
https://github.com/Jach/cl-ses4/blob/14b9dc5ffb2fe93db82312e3eefbdd4164572b71/src/canonicalize.lisp#L49
Metadata
Metadata
Assignees
Labels
No labels