Commit 285a61e9 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Fix bug in split-string's handling of an empty input — failed to return an empty list,

instead returned ("") or (NIL), which in turn causes getenv-pathnames to fail,
and eventually (default-source-registry) failed to properly default in absence of XDG_DATA_DIRS,
which itself breaks Debian installations. Big oops.
parent be53191e
......@@ -236,6 +236,7 @@ starting the separation from the end, e.g. when called with arguments
\"a.b.c.d.e\" :max 3 :separator \".\" it will return (\"a.b.c\" \"d\" \"e\")."
(block ()
(let ((list nil) (words 0) (end (length string)))
(when (zerop end) (return nil))
(flet ((separatorp (char) (find char separator))
(done () (return (cons (subseq string 0 end) list))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment