Fix buffer underflow bug in output line counter.
This commit is contained in:
parent
7f149998bb
commit
bc8a29fcf3
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ fn main() -> Result<(), ureq::Error> {
|
||||||
lines_output += 1;
|
lines_output += 1;
|
||||||
}
|
}
|
||||||
output.pop();
|
output.pop();
|
||||||
lines_output -= 1;
|
if lines_output > 0 {
|
||||||
|
lines_output -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
if lines_output >= term_size - 1 && term_size != 0{
|
if lines_output >= term_size - 1 && term_size != 0{
|
||||||
/* output is a different process that is not a tty (i.e. less), but we want to keep colour */
|
/* output is a different process that is not a tty (i.e. less), but we want to keep colour */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue