# HG changeset patch # User Andreas Schwab # Date 1195172260 0 # Node ID efbce875866948d742a17280e80855cf9bb89217 # Parent 749b70c4662b71364c309189865752e9b9263c03 Always take precision into account. diff -r 749b70c4662b -r efbce8758669 src/editfns.c --- 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]))