summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-01-06 16:07:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-01-06 16:07:17 (GMT)
commitff50c2170606b881f9c6deb3c87000ae9efae5cd (patch)
tree1792551d57acb0194afb9d889a8be54eb44aa839 /generic
parent4fd72d96f60ea42efd2dd4a885f85eb53df591b0 (diff)
downloadtcl-ff50c2170606b881f9c6deb3c87000ae9efae5cd.zip
tcl-ff50c2170606b881f9c6deb3c87000ae9efae5cd.tar.gz
tcl-ff50c2170606b881f9c6deb3c87000ae9efae5cd.tar.bz2
Corrected twiddling in internals of dictionaries so that literals can't get
destroyed.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclDictObj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index c74f10f..fc1cac1 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.56.2.1 2008/07/20 22:02:37 dkf Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.56.2.2 2009/01/06 16:07:17 dkf Exp $
*/
#include "tclInt.h"
@@ -2129,10 +2129,11 @@ DictIncrCmd(
*/
char *saved = dictPtr->bytes;
+ Tcl_Obj *oldPtr = dictPtr;
dictPtr->bytes = NULL;
dictPtr = Tcl_DuplicateObj(dictPtr);
- dictPtr->bytes = saved;
+ oldPtr->bytes = saved;
}
if (valuePtr == NULL) {
/*