diff options
| author | vincentdarley <vincentdarley> | 2003-01-24 11:59:28 (GMT) |
|---|---|---|
| committer | vincentdarley <vincentdarley> | 2003-01-24 11:59:28 (GMT) |
| commit | f86ee908d0d3f8b6f49300fff0e9f27668331a56 (patch) | |
| tree | 0edec3ad21f600e64fd4bd817c121ab1cadb4505 /generic/tclIO.c | |
| parent | 1d23bf81276f69e2e603d5038780d4b41a414a44 (diff) | |
| download | tcl-f86ee908d0d3f8b6f49300fff0e9f27668331a56.zip tcl-f86ee908d0d3f8b6f49300fff0e9f27668331a56.tar.gz tcl-f86ee908d0d3f8b6f49300fff0e9f27668331a56.tar.bz2 | |
stringObj unicode Tcl_SetObjLength fixes
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 912a651..e1298d5 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.57 2002/07/30 18:36:25 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.58 2003/01/24 11:59:29 vincentdarley Exp $ */ #include "tclInt.h" @@ -4388,6 +4388,12 @@ DoReadChars(chanPtr, objPtr, toRead, appendFlag) Tcl_SetByteArrayLength(objPtr, 0); } else { Tcl_SetObjLength(objPtr, 0); + /* + * We're going to access objPtr->bytes directly, so + * we must ensure that this is actually a string + * object (otherwise it might have been pure Unicode). + */ + Tcl_GetString(objPtr); } offset = 0; } else { |
