Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix [0e92c404f1]: Side effect on string range command (from encoding and format commands) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | mistake |
Files: | files | file ages | folders |
SHA1: |
77a7d8d12363281e2e0bfeafc848c6a0 |
User & Date: | jan.nijtmans 2014-04-30 20:22:40 |
References
2014-04-30
| ||
20:38 | • Closed ticket [0e92c404f1]: Side effect on string range command (from encoding and format commands) plus 7 other changes artifact: 685bd28123 user: jan.nijtmans | |
Context
2014-04-30
| ||
20:22 | Fix [0e92c404f1]: Side effect on string range command (from encoding and format commands) Closed-Leaf check-in: 77a7d8d123 user: jan.nijtmans tags: mistake | |
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
Changes to generic/tclCmdMZ.c.
︙ | ︙ | |||
2068 2069 2070 2071 2072 2073 2074 | static int StringRangeCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { | < < < < < < < < < < < | > | < | < < < < < < < < < < | < | 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 | static int StringRangeCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int length, first, last; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "string first last"); return TCL_ERROR; } /* * Get the length in actual characters; Then reduce it by one because * 'end' refers to the last character, not one past it. */ length = Tcl_GetCharLength(objv[1]) - 1; if (TclGetIntForIndexM(interp, objv[2], length, &first) != TCL_OK || TclGetIntForIndexM(interp, objv[3], length, &last) != TCL_OK) { return TCL_ERROR; } if (first < 0) { first = 0; } if (last >= length) { last = length; } if (last >= first) { Tcl_SetObjResult(interp, Tcl_GetRange(objv[1], first, last)); } return TCL_OK; } /* *---------------------------------------------------------------------- * |
︙ | ︙ |