Tcl Source Code

Check-in [b8c06f813e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Better (safer) fix for [0e92c404f1]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: b8c06f813edfe649a89735db3360bd9bbfee4571
User & Date: jan.nijtmans 2014-04-30 21:59:00
Context
2014-05-01
07:38
Fix more corner-cases like [0e92c404f1]: The only place wher... check-in: 91be696bf3 user: jan.nijtmans tags: core-8-5-branch
01:26
Merge in the fixes for improper ChannelBuffer sharing via recycling. check-in: a63b3cbe41 user: dgp tags: trunk
2014-04-30
21:59
Better (safer) fix for [0e92c404f1] check-in: b8c06f813e user: jan.nijtmans tags: core-8-5-branch
19:54
Stop the segfaults in [close] during [gets] tests. Not sure this is the right behavior, but it's bet... check-in: 04b1f8b14c user: dgp tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclCmdMZ.c.

2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096

    /*
     * If we have a ByteArray object, avoid indexing in the Utf string since
     * the byte array contains one byte per character. Otherwise, use the
     * Unicode string rep to get the range.
     */

    if (objv[1]->typePtr == &tclByteArrayType) {
	string = Tcl_GetByteArrayFromObj(objv[1], &length);
	length--;
    } else {
	/*
	 * Get the length in actual characters.
	 */








|







2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096

    /*
     * If we have a ByteArray object, avoid indexing in the Utf string since
     * the byte array contains one byte per character. Otherwise, use the
     * Unicode string rep to get the range.
     */

    if (objv[1]->typePtr == &tclByteArrayType && (objv[1]->bytes==NULL)) {
	string = Tcl_GetByteArrayFromObj(objv[1], &length);
	length--;
    } else {
	/*
	 * Get the length in actual characters.
	 */