[hackers] [sbase] call to addpre() in every iteration of subline() || Roberto E. Vargas Caballero
commit 694a5ef7fbca54581a431a528972509c5a2e8bc0
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Dec 16 20:18:09 2015 +0100
Commit: sin <sin_AT_2f30.org>
CommitDate: Wed Dec 16 20:16:12 2015 +0000
call to addpre() in every iteration of subline()
It is needed to call to addpre(), because in other
case the prefix of all the occurrences before
the target will not be copied to the result
string.
diff --git a/ed.c b/ed.c
index 33b4837..c060e5f 100644
--- a/ed.c
+++ b/ed.c
_AT_@ -991,10 +991,10 @@ subline(int num, int nth)
siz = 0;
for (m = match(num); m; m = rematch(num)) {
+ addpre(&s, &cap, &siz);
if (--nth > 0)
continue;
changed = 1;
- addpre(&s, &cap, &siz);
addsub(&s, &cap, &siz);
if (nth == 0)
break;
Received on Wed Dec 16 2015 - 21:16:19 CET
This archive was generated by hypermail 2.3.0
: Wed Dec 16 2015 - 21:24:17 CET