summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/regex/engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index a12538f..04844ba 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -236,7 +236,7 @@ int eflags;
/* Adjust start according to moffset, to speed things up */
if (g->moffset > -1)
- start = dp - g->moffset;
+ start = ((dp - g->moffset) < start) ? start : dp - g->moffset;
/* this loop does only one repetition except for backrefs */
for (;;) {
OpenPOWER on IntegriCloud