diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2011-06-06 00:46:26 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2011-06-06 00:46:26 +0200 |
commit | 172418ad545a924481fcbde47882a83c4d86b280 (patch) | |
tree | 626bd70a0c333d8968d14480b526ba44c5ddbc8b /src/editfns.c | |
parent | 43f862f74edd06ca10add513506cc025bacb422d (diff) |
Fixes: debbugs:8806
* src/editfns.c (Fformat): Correctly handle zero flag with hexadecimal
format.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index 0e40fde9ca..b961e602e4 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4083,7 +4083,10 @@ usage: (format STRING &rest OBJECTS) */) int exponent_bytes = 0; int signedp = src0 == '-' || src0 == '+' || src0 == ' '; int significand_bytes; - if (zero_flag && '0' <= src[signedp] && src[signedp] <= '9') + if (zero_flag + && ((src[signedp] >= '0' && src[signedp] <= '9') + || (src[signedp] >= 'a' && src[signedp] <= 'f') + || (src[signedp] >= 'A' && src[signedp] <= 'F'))) { leading_zeros += padding; padding = 0; |