Permalink
Browse files

Fix div by zero error in 'report-progress

  • Loading branch information...
1 parent 8652136 commit 99955e744f102c9f85e881dd4d69ca74c43b2829 @Chouser Chouser committed Jan 2, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/leiningen/voom.clj
View
@@ -433,7 +433,9 @@
[msg xs]
(concat
(let [c (count xs)
- digits (inc (long (quot (Math/log c) (Math/log 10))))
+ digits (inc (long (if (zero? c)
+ 1
+ (quot (Math/log c) (Math/log 10)))))
t (new-throttle
(fn [i]
(printf (str "\r%s %" digits "d/%d ...") msg (inc i) c)

0 comments on commit 99955e7

Please sign in to comment.