diff options
| author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-01-23 11:18:52 (GMT) |
|---|---|---|
| committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-01-23 11:18:52 (GMT) |
| commit | 06ebc9ede5f33e7b3a283193b46ee82c7c779d19 (patch) | |
| tree | 052fd6689293161622275ecc754244534721d4ed | |
| parent | a2fdf1626069fc4ef70837d48e62cc584142b8aa (diff) | |
| download | tcl-06ebc9ede5f33e7b3a283193b46ee82c7c779d19.zip tcl-06ebc9ede5f33e7b3a283193b46ee82c7c779d19.tar.gz tcl-06ebc9ede5f33e7b3a283193b46ee82c7c779d19.tar.bz2 | |
* generic/tclStringObj.c: fixed incorrect handling of internal rep
in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth.
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | generic/tclStringObj.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2006-01-23 Miguel Sofer <msofer@users.sf.net> + * generic/tclStringObj.c: fixed incorrect handling of internal rep + in Tcl_GetRange [Bug 1410553]. Thanks to twylite and Peter Spjuth. + * generic/tclProc.c: fixed args handling for precompiled bodies [Bug 1412695]; thanks to Uwe Traum. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index fa8f949..a1c5bd3 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.51 2005/11/02 11:55:47 dkf Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.52 2006/01/23 11:18:52 msofer Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -636,7 +636,7 @@ Tcl_GetRange( stringPtr = GET_STRING(objPtr); } - if (stringPtr->numChars == objPtr->length) { + if (objPtr->bytes && (stringPtr->numChars == objPtr->length)) { char *str = Tcl_GetString(objPtr); /* |
