Commit 172418ad authored by Andreas Schwab's avatar Andreas Schwab

Fixes: debbugs:8806

* src/editfns.c (Fformat): Correctly handle zero flag with hexadecimal
format.
parent 43f862f7
2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
* editfns.c (Fformat): Correctly handle zero flag with hexadecimal
format. (Bug#8806)
* gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
* xfns.c (x_set_scroll_bar_default_width): Move declarations
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment