Przeglądaj źródła

minor fix on no data

Innocenty Enikeew 8 lat temu
rodzic
commit
9fc54dc822
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      pta-ledger.lisp

+ 1 - 1
pta-ledger.lisp

@@ -538,7 +538,7 @@
 
 (defun format-balance (balance)
   (let* ((accounts (alexandria:hash-table-keys balance))
-         (max-account-length (apply #'max (mapcar #'length accounts))))
+         (max-account-length (if accounts (apply #'max (mapcar #'length accounts)) 20)))
     (with-output-to-string (s)
       (loop for account in (sort accounts #'string<)
          for amounts = (gethash account balance)