[commit: base] master: fix negative numbers for * modifiers (#7457) (63202b9)
Simon Marlow
marlowsd at gmail.com
Mon Jan 28 11:06:48 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/63202b9df64041e1c17603ad5f06fec3c51f357d
>---------------------------------------------------------------
commit 63202b9df64041e1c17603ad5f06fec3c51f357d
Author: Simon Marlow <marlowsd at gmail.com>
Date: Mon Jan 28 09:38:06 2013 +0000
fix negative numbers for * modifiers (#7457)
>---------------------------------------------------------------
Text/Printf.hs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Text/Printf.hs b/Text/Printf.hs
index 0546e84..6028e16 100644
--- a/Text/Printf.hs
+++ b/Text/Printf.hs
@@ -281,7 +281,7 @@ getSpecs l z s ('*':cs) us =
in ((p', r), us''')
'.':r -> (stoi 0 r, us')
_ -> ((-1, cs), us')
- in (n, p, l, z, s, cs'', us'')
+ in (abs n, p, if n < 0 then not l else l, z, s, cs'', us'')
getSpecs l z s ('.':cs) us =
let ((p, cs'), us') =
case cs of
More information about the ghc-commits
mailing list