Commit 9dadbc284b1d09e6e8025160af8d0daf6bc0e5fb

Thomas de Grivel 2021-02-03T14:48:57

fix base-positional for base 1

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/positional.lisp b/positional.lisp
index 7d7ac75..e09885e 100644
--- a/positional.lisp
+++ b/positional.lisp
@@ -75,6 +75,8 @@
          (concatenate 'string "-" (base-positional base (- number))))
         ((= number 0)
          (make-string 1 :initial-element (char base 0)))
+        ((= 1 (length base))
+         (make-string number :initial-element (char base 0)))
         (t
          (let* ((base-n (length base))
                 (out-n (1+ (floor (log number base-n))))