summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-10 21:27:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-10 21:27:17 (GMT)
commitf98c78b6a077737cbda73f643aa3a9dc87893ad8 (patch)
tree0db8e2ef5a7b5c423ad50fd0d0add26111e0fd82 /generic
parent378202fab847a2ea292310e3322a08c2f67c2ca2 (diff)
downloadtcl-f98c78b6a077737cbda73f643aa3a9dc87893ad8.zip
tcl-f98c78b6a077737cbda73f643aa3a9dc87893ad8.tar.gz
tcl-f98c78b6a077737cbda73f643aa3a9dc87893ad8.tar.bz2
* generic/tclStringObj.c (UpdateStringOfString): Fix bug detected
by compiler warning about undefined "dst".
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStringObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index b4e5995..1f221f9 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.9 2009/04/07 18:37:23 dgp Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.10 2009/04/10 21:27:17 dgp Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -2934,12 +2934,12 @@ UpdateStringOfString(
Tcl_Panic("max size for a Tcl value (%d bytes) exceeded", INT_MAX);
}
- dst = (char *) ckalloc((unsigned) (size + 1));
- objPtr->bytes = dst;
+ objPtr->bytes = (char *) ckalloc((unsigned) (size + 1));
objPtr->length = size;
stringPtr->allocated = size;
copyBytes:
+ dst = objPtr->bytes;
for (i = 0; i < stringPtr->numChars; i++) {
dst += Tcl_UniCharToUtf(unicode[i], dst);
}