Mercurial > emacs
changeset 86127:efbce8758669
Always take precision into account.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 16 Nov 2007 00:17:40 +0000 |
parents | 749b70c4662b |
children | 42479f4b206b |
files | src/editfns.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Fri Nov 16 00:10:00 2007 +0000 +++ b/src/editfns.c Fri Nov 16 00:17:40 2007 +0000 @@ -3594,8 +3594,6 @@ /* Would get MPV otherwise, since Lisp_Int's `point' to low memory. */ else if (INTEGERP (args[n]) && *format != 's') { - thissize = 30; - /* The following loop assumes the Lisp type indicates the proper way to pass the argument. So make sure we have a flonum if the argument should @@ -3603,14 +3601,13 @@ if (*format == 'e' || *format == 'f' || *format == 'g') { args[n] = Ffloat (args[n]); - if (precision[n] > 0) - thissize += precision[n]; } else if (*format != 'd' && *format != 'o' && *format != 'x' && *format != 'i' && *format != 'X' && *format != 'c') error ("Invalid format operation %%%c", *format); + thissize = 30 + (precision[n] > 0 ? precision[n] : 0); if (*format == 'c') { if (! SINGLE_BYTE_CHAR_P (XINT (args[n]))