aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-31 19:36:01 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-12-31 19:36:01 +0000
commitb1476ce53460e87dc068a01011d3b1cf30540bb4 (patch)
tree3d39b47cae1ff8aed5dbd78dc9f0458a33b05fe6
parentd6183e7ce36754844e95b920fc870082e034c343 (diff)
downloadbusybox-w32-b1476ce53460e87dc068a01011d3b1cf30540bb4.tar.gz
busybox-w32-b1476ce53460e87dc068a01011d3b1cf30540bb4.tar.bz2
busybox-w32-b1476ce53460e87dc068a01011d3b1cf30540bb4.zip
less: fix <tab><backspace> buglet
git-svn-id: svn://busybox.net/trunk/busybox@17121 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--miscutils/less.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index ae936c2fb..20da02208 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -212,13 +212,13 @@ static void read_lines(void)
212 } 212 }
213 } 213 }
214 c = readbuf[readpos]; 214 c = readbuf[readpos];
215 /* backspace? [need this for manpage display] */ 215 /* backspace? [needed for manpages] */
216 if (c == '\x8' && linepos) { 216 /* <tab><bs> is (a) insane and */
217 /* (b) harder to do correctly, so we refuse to do it */
218 if (c == '\x8' && linepos && p[-1] != '\t') {
217 readpos++; /* eat it */ 219 readpos++; /* eat it */
218 /* We do not consider the case of <tab><bs> */
219 /* Anyone who has that is pure evil :) */
220 linepos--; 220 linepos--;
221 *p-- = '\0'; 221 *--p = '\0';
222 continue; 222 continue;
223 } 223 }
224 if (c == '\t') 224 if (c == '\t')