浏览代码

minor fix on no data

Innocenty Enikeew 8 年之前
父节点
当前提交
9fc54dc822
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)