summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-07-31 16:56:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-07-31 16:56:32 (GMT)
commit650af7427f1141bd002f121f832b524947fa0369 (patch)
tree3c1082ad05283d6a4f25aa1ea051b45b788704c3 /generic/tclStringObj.c
parent66987125b0f99128ef810d06ed5e63728f198444 (diff)
downloadtcl-650af7427f1141bd002f121f832b524947fa0369.zip
tcl-650af7427f1141bd002f121f832b524947fa0369.tar.gz
tcl-650af7427f1141bd002f121f832b524947fa0369.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/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 093eca3..6e202d5 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.70.2.16 2009/07/15 22:27:14 das Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.17 2009/07/31 16:56:32 dgp Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -2356,6 +2356,9 @@ Tcl_AppendFormatToObj(
}
if (width) {
p += sprintf(p, "%d", width);
+ if (width > length) {
+ length = width;
+ }
}
if (gotPrecision) {
*p++ = '.';