diff --git a/src/ctpv.c b/src/ctpv.c index d6dd5a0..c402df4 100644 --- a/src/ctpv.c +++ b/src/ctpv.c @@ -242,7 +242,7 @@ static RESULT preview(int argc, char *argv[]) } /* To some reason lf chops off last 2 characters of a line */ - w_l -= 2; + w_l = MAX(0, w_l - 2); snprintf(w_buf, LEN(w_buf), "%ld", w_l); snprintf(h_buf, LEN(h_buf), "%ld", h_l);