summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-07-31 16:55:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-07-31 16:55:58 (GMT)
commit71048d27d0a64c0fa11da33a09037c820babf6e5 (patch)
treefd17f363dc183b557097999d1baff4b82b0cf2b3 /generic
parent6cfb3d987a48cb1ed8dcde2df5c84a5dddae1dde (diff)
downloadtcl-71048d27d0a64c0fa11da33a09037c820babf6e5.zip
tcl-71048d27d0a64c0fa11da33a09037c820babf6e5.tar.gz
tcl-71048d27d0a64c0fa11da33a09037c820babf6e5.tar.bz2
* generic/tclStringObj.c: Corrected failure to grow buffer
* tests/format.test: when format spec request large width floating point values. Thanks to Clemens Misch. [Bug 2830354]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStringObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 7804e1f..9ba62f5 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -33,7 +33,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStringObj.c,v 1.127 2009/07/12 18:04:33 dkf Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.128 2009/07/31 16:55:58 dgp Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -2211,6 +2211,9 @@ Tcl_AppendFormatToObj(
}
if (width) {
p += sprintf(p, "%d", width);
+ if (width > length) {
+ length = width;
+ }
}
if (gotPrecision) {
*p++ = '.';