aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-06 07:59:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-06 07:59:34 -0700
commite04b04fe0d32c914d962d2e5c2a553131f21ceaf (patch)
tree121bba5c2d599727f53e7f6b1b30c07b3fc49ddd
parentb6c963b80dfa4f55bb2397497a2eec73dfeac225 (diff)
downloadpw-e04b04fe0d32c914d962d2e5c2a553131f21ceaf.tar.gz
pw-e04b04fe0d32c914d962d2e5c2a553131f21ceaf.tar.bz2
pw-e04b04fe0d32c914d962d2e5c2a553131f21ceaf.zip
Limit scrolling to max line length, not arbitrary 10000.
-rw-r--r--pw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw.c b/pw.c
index 773fb67..41c8516 100644
--- a/pw.c
+++ b/pw.c
@@ -1200,7 +1200,7 @@ int main(int argc, char **argv)
case 'l':
if (cmdcount == UINT_MAX)
cmdcount = 8;
- if (pw.hpos < 10000)
+ if ((size_t) pw.hpos < maxlen)
pw.hpos += cmdcount;
pw.stat |= stat_force;
break;