From 71318d6690a3d27b16f293173f4b593f0ee0388d Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 23 Jan 2006 11:24:36 +0000 Subject: * generic/tclStringObj.c: fixed incorrect handling of internal rep in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth. --- ChangeLog | 5 +++++ generic/tclStringObj.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b6b24d..955cde2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-23 Miguel Sofer + + * generic/tclStringObj.c: fixed incorrect handling of internal rep + in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth. + 2006-01-16 Reinhard Max * generic/tclPipe.c (FileForRedirect): Prevent nameString from diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 5925451..9ec2f63 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.32 2003/02/19 16:43:28 das Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.32.2.1 2006/01/23 11:24:36 msofer Exp $ */ #include "tclInt.h" @@ -642,7 +642,7 @@ Tcl_GetRange(objPtr, first, last) stringPtr = GET_STRING(objPtr); } - if (stringPtr->numChars == objPtr->length) { + if (objPtr->bytes && stringPtr->numChars == objPtr->length) { char *str = Tcl_GetString(objPtr); /* -- cgit v0.12