summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-21 15:56:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-21 15:56:00 (GMT)
commit47d1b636974e729a49f403aa16a46bfb4865402a (patch)
treebbf94bdf4cfdecd71a52a26895ca9e644a53e4d1 /generic/tclCmdMZ.c
parent37b655adbfe82ac129c013442a5ef951cb1316a3 (diff)
parent4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb (diff)
downloadtcl-47d1b636974e729a49f403aa16a46bfb4865402a.zip
tcl-47d1b636974e729a49f403aa16a46bfb4865402a.tar.gz
tcl-47d1b636974e729a49f403aa16a46bfb4865402a.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c12
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();
}