git.fiddlerwoaroof.com
Browse code

fix: misc bugs

Edward Langley authored on 28/08/2022 06:50:31
Showing 2 changed files
... ...
@@ -34,7 +34,10 @@
34 34
            #:empty-hash-table-like #:v-assoc #:defclass+
35 35
            #:closing
36 36
            #:inits
37
-           #:retry-once))
37
+           #:retry-once
38
+           #:hashtable-slot-mixin
39
+           #:hsm-doc
40
+           #:str->stream))
38 41
 
39 42
 
40 43
 (defpackage :fwoar.lisputils.shortcuts
... ...
@@ -13,13 +13,15 @@
13 13
   (flet ((count-splits (string)
14 14
            (declare (optimize (speed 3))
15 15
                     (type simple-string string))
16
+           (if (= 0 (length string))
17
+               1
16 18
            (do* ((x (the array-length 0) (1+ x))
17 19
                  (cur-char #1=(aref string x) #1#)
18 20
                  (result (the array-length 0) (if (char= cur-char char)
19 21
                                                   (1+ result)
20 22
                                                   result)))
21 23
                 ((= x (1- (length string))) (1+ result))
22
-             (declare (type array-length result)))))
24
+                 (declare (type array-length result))))))
23 25
     (typecase string
24 26
       ((and string (not simple-string))
25 27
        (setf string (copy-seq string))))