diff options
author | Andreas Schwab <schwab@suse.de> | 2007-11-16 00:17:40 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2007-11-16 00:17:40 +0000 |
commit | 0e4df721fa28e3cfd9992fa6db0bd266fb94f5e7 (patch) | |
tree | 3f0a5650db65dcfa82b91a94c5ce6b19933da5d2 | |
parent | 8875d2c00e62b6cef44e2ca19627427103512dd9 (diff) | |
download | emacs-0e4df721fa28e3cfd9992fa6db0bd266fb94f5e7.tar.gz |
Always take precision into account.
-rw-r--r-- | src/editfns.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c index eaee2bfadfa..fae485ae709 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3594,8 +3594,6 @@ usage: (format STRING &rest OBJECTS) */) /* 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 @@ usage: (format STRING &rest OBJECTS) */) 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])) |