diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-09-22 05:38:30 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-09-22 05:38:30 +0000 |
commit | 7d6a7408c5cf9cd40d22001c03e226d34e8494b8 (patch) | |
tree | bc7e2e3a5a76a05be93f1a93a4a3e0d63008e515 /usr.bin | |
parent | 400c6fe5b7421a234a70c9ed3b490c7bdb9b6312 (diff) |
- handle deltatexts which don't end in a newline character. fixes PR #5241.
ok ray@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/rcsutil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c index 43a594f1562..db019a01d59 100644 --- a/usr.bin/rcs/rcsutil.c +++ b/usr.bin/rcs/rcsutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsutil.c,v 1.19 2006/09/19 05:52:23 otto Exp $ */ +/* $OpenBSD: rcsutil.c,v 1.20 2006/09/22 05:38:29 niallo Exp $ */ /* * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> @@ -492,7 +492,8 @@ rcs_splitlines(BUF *fcont) p = c = lines->l_data; for (i = 0; i < rcs_buf_len(fcont); i++) { - if (*p == '\n') { + if (*p == '\n' || (i == rcs_buf_len(fcont) - 1 && *c)) { + printf("c: %x\n", *c); len = p - c; lp = xmalloc(sizeof(*lp)); lp->l_line = xmalloc(len + 1); |