1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-11 05:58:01 -05:00

curl:progressbarinit: ignore column width from terminals < 20

To avoid division by zero - or other issues.

Reported-by: Daniel Marjamäki
Closes #4818
This commit is contained in:
Daniel Stenberg 2020-01-14 22:18:12 +01:00
parent 68403cdbc6
commit c2feed05bc
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -251,6 +251,7 @@ void progressbarinit(struct ProgressData *bar,
}
}
#endif /* TIOCGSIZE */
if(cols > 20)
bar->width = cols;
}