---
ed.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ed.c b/ed.c
index c560d1a..77aad19 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -406,8 +406,13 @@ match(int num)
static int
rematch(int num)
{
- lastmatch += matchs[0].rm_eo;
- return !regexec(pattern, lastmatch, 10, matchs, 0);
+ regoff_t off = matchs[0].rm_eo;
+
+ if (!regexec(pattern, lastmatch + off, 10, matchs, 0)) {
+ lastmatch += off;
+ return 1;
+ }
+ return 0;
}
static int
--
2.1.4
Received on Thu Jan 07 2016 - 11:37:56 CET
This archive was generated by hypermail 2.3.0 : Thu Jan 07 2016 - 11:48:13 CET