aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/less.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 5c53cbdbf..b38fcf766 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -512,16 +512,6 @@ static void read_lines(void)
512 *--p = '\0'; 512 *--p = '\0';
513 continue; 513 continue;
514 } 514 }
515 {
516 size_t new_last_line_pos = last_line_pos + 1;
517 if (c == '\t') {
518 new_last_line_pos += 7;
519 new_last_line_pos &= (~7);
520 }
521 if ((int)new_last_line_pos >= w)
522 break;
523 last_line_pos = new_last_line_pos;
524 }
525 /* ok, we will eat this char */ 515 /* ok, we will eat this char */
526 readpos++; 516 readpos++;
527 if (c == '\n') { 517 if (c == '\n') {
@@ -533,6 +523,16 @@ static void read_lines(void)
533 if (c == '\0') c = '\n'; 523 if (c == '\0') c = '\n';
534 *p++ = c; 524 *p++ = c;
535 *p = '\0'; 525 *p = '\0';
526 {
527 size_t new_last_line_pos = last_line_pos + 1;
528 if (c == '\t') {
529 new_last_line_pos += 7;
530 new_last_line_pos &= (~7);
531 }
532 if ((int)new_last_line_pos >= w)
533 break;
534 last_line_pos = new_last_line_pos;
535 }
536 } /* end of "read chars until we have a line" loop */ 536 } /* end of "read chars until we have a line" loop */
537#if 0 537#if 0
538//BUG: also triggers on this: 538//BUG: also triggers on this: