svn commit: r189139 - head/contrib/less
David Schultz
das at FreeBSD.org
Fri Feb 27 22:27:24 PST 2009
Author: das
Date: Sat Feb 28 06:27:23 2009
New Revision: 189139
URL: http://svn.freebsd.org/changeset/base/189139
Log:
Make `less -R' not crash all the time.
Modified:
head/contrib/less/line.c
Modified: head/contrib/less/line.c
==============================================================================
--- head/contrib/less/line.c Sat Feb 28 06:06:57 2009 (r189138)
+++ head/contrib/less/line.c Sat Feb 28 06:27:23 2009 (r189139)
@@ -601,9 +601,11 @@ store_char(ch, a, rep, pos)
{
if (!is_ansi_end(ch) && !is_ansi_middle(ch)) {
/* Remove whole unrecognized sequence. */
- do {
+ while (curr) {
--curr;
- } while (!IS_CSI_START(linebuf[curr]));
+ if (IS_CSI_START(linebuf[curr]))
+ break;
+ }
return 0;
}
a = AT_ANSI; /* Will force re-AT_'ing around it. */
More information about the svn-src-head
mailing list