summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-21 15:15:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-21 15:15:45 (GMT)
commit4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb (patch)
tree17b92f779e8d36d2fe06aea9add1b69497ca24c2 /generic/tclCmdMZ.c
parent65ca3bc25beba08d22f9f216316ea719236eacc4 (diff)
parentd4e2ae119e3f6d6e5d430cf810ea4dc396ecd9b7 (diff)
downloadtcl-4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb.zip
tcl-4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb.tar.gz
tcl-4d0a0d7dc2bc8c2e2d173f596faf12c00bfeeacb.tar.bz2
Merge 8.6
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 c0c3b6f..e4946ee 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -394,14 +394,10 @@ Tcl_RegexpObjCmd(
newPtr = Tcl_NewListObj(2, objs);
} else {
- if (i <= info.nsubs) {
- if (info.matches[i].end <= 0) {
- TclNewObj(newPtr);
- } else {
- newPtr = Tcl_GetRange(objPtr,
- offset + info.matches[i].start,
- offset + info.matches[i].end - 1);
- }
+ if ((i <= info.nsubs) && (info.matches[i].end > 0)) {
+ newPtr = Tcl_GetRange(objPtr,
+ offset + info.matches[i].start,
+ offset + info.matches[i].end - 1);
} else {
TclNewObj(newPtr);
}