diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-21 15:56:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-21 15:56:00 (GMT) |
commit | 47d1b636974e729a49f403aa16a46bfb4865402a (patch) | |
tree | bbf94bdf4cfdecd71a52a26895ca9e644a53e4d1 /generic/tclCmdMZ.c | |
parent | 37b655adbfe82ac129c013442a5ef951cb1316a3 (diff) | |
parent | 4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb (diff) | |
download | tcl-47d1b636974e729a49f403aa16a46bfb4865402a.zip tcl-47d1b636974e729a49f403aa16a46bfb4865402a.tar.gz tcl-47d1b636974e729a49f403aa16a46bfb4865402a.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 83a1dbc..92b419d 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -394,14 +394,10 @@ Tcl_RegexpObjCmd( newPtr = Tcl_NewListObj(2, objs); } else { - if (i <= (int)info.nsubs) { - if (info.matches[i].end + 1 <= 1) { - TclNewObj(newPtr); - } else { - newPtr = Tcl_GetRange(objPtr, - offset + info.matches[i].start, - offset + info.matches[i].end - 1); - } + if ((i <= (int)info.nsubs) && (info.matches[i].end + 1 > 1)) { + newPtr = Tcl_GetRange(objPtr, + offset + info.matches[i].start, + offset + info.matches[i].end - 1); } else { newPtr = Tcl_NewObj(); } |