diff options
author | bapt <bapt@FreeBSD.org> | 2015-04-10 17:50:28 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-04-10 17:50:28 +0000 |
commit | c7f08411e0a7093fd65b33ad890811466257df99 (patch) | |
tree | bb238a04251527b96bb646b776058bba8293a640 /contrib/nvi/ex/ex_join.c | |
parent | 62376cf1de8b943fb2849e0ee409f0b0d7293e07 (diff) | |
parent | c42d98a117446dd83b8d13800dd2e3726cb0d2d0 (diff) | |
download | FreeBSD-src-c7f08411e0a7093fd65b33ad890811466257df99.zip FreeBSD-src-c7f08411e0a7093fd65b33ad890811466257df99.tar.gz |
Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
Diffstat (limited to 'contrib/nvi/ex/ex_join.c')
-rw-r--r-- | contrib/nvi/ex/ex_join.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/nvi/ex/ex_join.c b/contrib/nvi/ex/ex_join.c index 822ed79..2917b2e 100644 --- a/contrib/nvi/ex/ex_join.c +++ b/contrib/nvi/ex/ex_join.c @@ -30,7 +30,7 @@ static const char sccsid[] = "$Id: ex_join.c,v 10.17 2004/03/16 14:14:04 skimo E * ex_join -- :[line [,line]] j[oin][!] [count] [flags] * Join lines. * - * PUBLIC: int ex_join __P((SCR *, EXCMD *)); + * PUBLIC: int ex_join(SCR *, EXCMD *); */ int ex_join(SCR *sp, EXCMD *cmdp) @@ -62,7 +62,7 @@ ex_join(SCR *sp, EXCMD *cmdp) ++cmdp->addr2.lno; clen = tlen = 0; - for (first = 1, + for (first = 1, from = cmdp->addr1.lno, to = cmdp->addr2.lno; from <= to; ++from) { /* * Get next line. Historic versions of vi allowed "10J" while @@ -154,7 +154,7 @@ ex_join(SCR *sp, EXCMD *cmdp) sp->lno = cmdp->addr1.lno; /* Delete the joined lines. */ - for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; to > from; --to) + for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; to > from; --to) if (db_delete(sp, to)) goto err; |