← Commit list

50ddabc85

Denis Vlasenko
Denis Vlasenko
2006-12-31
FAILED Duration: 5s

Subject

less: fix buglet

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/less.c+5 -5
@@ -212,13 +212,13 @@ static void read_lines(void)
}
}
c = readbuf[readpos];
- /* backspace? [need this for manpage display] */
- if (c == '\x8' && linepos) {
+ /* backspace? [needed for manpages] */
+ /* <tab><bs> is (a) insane and */
+ /* (b) harder to do correctly, so we refuse to do it */
+ if (c == '\x8' && linepos && p[-1] != '\t') {
readpos++; /* eat it */
- /* We do not consider the case of <tab><bs> */
- /* Anyone who has that is pure evil :) */
linepos--;
- *p-- = '\0';
+ *--p = '\0';
continue;
}
if (c == '\t')