diff options
| author | Andreas Schwab | 2011-06-06 00:46:26 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2011-06-06 00:46:26 +0200 |
| commit | 172418ad545a924481fcbde47882a83c4d86b280 (patch) | |
| tree | 626bd70a0c333d8968d14480b526ba44c5ddbc8b /src | |
| parent | 43f862f74edd06ca10add513506cc025bacb422d (diff) | |
| download | emacs-172418ad545a924481fcbde47882a83c4d86b280.tar.gz emacs-172418ad545a924481fcbde47882a83c4d86b280.zip | |
Fixes: debbugs:8806
* src/editfns.c (Fformat): Correctly handle zero flag with hexadecimal
format.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/editfns.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1b16fdc089c..ca369bf38f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-06-05 Andreas Schwab <schwab@linux-m68k.org> | 1 | 2011-06-05 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 2 | ||
| 3 | * editfns.c (Fformat): Correctly handle zero flag with hexadecimal | ||
| 4 | format. (Bug#8806) | ||
| 5 | |||
| 3 | * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning. | 6 | * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning. |
| 4 | 7 | ||
| 5 | * xfns.c (x_set_scroll_bar_default_width): Move declarations | 8 | * xfns.c (x_set_scroll_bar_default_width): Move declarations |
diff --git a/src/editfns.c b/src/editfns.c index 0e40fde9ca4..b961e602e4c 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -4083,7 +4083,10 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4083 | int exponent_bytes = 0; | 4083 | int exponent_bytes = 0; |
| 4084 | int signedp = src0 == '-' || src0 == '+' || src0 == ' '; | 4084 | int signedp = src0 == '-' || src0 == '+' || src0 == ' '; |
| 4085 | int significand_bytes; | 4085 | int significand_bytes; |
| 4086 | if (zero_flag && '0' <= src[signedp] && src[signedp] <= '9') | 4086 | if (zero_flag |
| 4087 | && ((src[signedp] >= '0' && src[signedp] <= '9') | ||
| 4088 | || (src[signedp] >= 'a' && src[signedp] <= 'f') | ||
| 4089 | || (src[signedp] >= 'A' && src[signedp] <= 'F'))) | ||
| 4087 | { | 4090 | { |
| 4088 | leading_zeros += padding; | 4091 | leading_zeros += padding; |
| 4089 | padding = 0; | 4092 | padding = 0; |