summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 6235470..ab04b32 100644
--- a/lib.c
+++ b/lib.c
@@ -1804,7 +1804,13 @@ uc_match(uc_vm_t *vm, size_t nargs)
ucv_array_push(rv, m);
- p += pmatch[0].rm_eo;
+ if (pmatch[0].rm_so != pmatch[0].rm_eo)
+ p += pmatch[0].rm_eo;
+ else if (*p)
+ p++;
+ else
+ break;
+
eflags |= REG_NOTBOL;
}
else {