mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-24 13:53:07 +01:00
Fix: disallow negative width
This commit is contained in:
parent
285d72df3a
commit
c54edbd235
@ -242,7 +242,7 @@ static RESULT preview(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* To some reason lf chops off last 2 characters of a line */
|
/* 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(w_buf, LEN(w_buf), "%ld", w_l);
|
||||||
snprintf(h_buf, LEN(h_buf), "%ld", h_l);
|
snprintf(h_buf, LEN(h_buf), "%ld", h_l);
|
||||||
|
Loading…
Reference in New Issue
Block a user