aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/pprint
diff options
context:
space:
mode:
authorTom Faulhaber <git_net@infolace.com>2009-10-31 00:11:18 -0700
committerTom Faulhaber <git_net@infolace.com>2009-10-31 00:11:18 -0700
commit3f267049a38f205ac3c7d91173c63648f139e790 (patch)
treec7a61e812f3d0fdc3b7b62f49fbf1ab9ba774144 /src/clojure/contrib/pprint
parentd9c42218f493e7eb261677047008cedb67364ee8 (diff)
cl-format: ~$ wasn't handling negative numbers correctly
refs #40
Diffstat (limited to 'src/clojure/contrib/pprint')
-rw-r--r--src/clojure/contrib/pprint/cl-format.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure/contrib/pprint/cl-format.clj b/src/clojure/contrib/pprint/cl-format.clj
index 64fc4f30..b0531c14 100644
--- a/src/clojure/contrib/pprint/cl-format.clj
+++ b/src/clojure/contrib/pprint/cl-format.clj
@@ -759,7 +759,7 @@ Note this should only be used for the last one in the sequence"
d (:d params) ; digits after the decimal
n (:n params) ; minimum digits before the decimal
w (:w params) ; minimum field width
- add-sign (and (:at params) (not (neg? arg)))
+ add-sign (or (:at params) (neg? arg))
[rounded-mantissa scaled-exp _] (round-str mantissa exp d nil)
#^String fixed-repr (get-fixed rounded-mantissa scaled-exp d)
full-repr (str (apply str (repeat (- n (.indexOf fixed-repr (int \.))) \0)) fixed-repr)