Make `less -R' not crash all the time.

This commit is contained in:
das 2009-02-28 06:27:23 +00:00
parent e5de8b5d17
commit 3f9ccbd00f

View File

@ -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. */