mirror of
https://github.com/curl/curl.git
synced 2026-04-18 07:21:42 +03: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:
parent
68403cdbc6
commit
c2feed05bc
1 changed files with 2 additions and 1 deletions
|
|
@ -251,7 +251,8 @@ void progressbarinit(struct ProgressData *bar,
|
|||
}
|
||||
}
|
||||
#endif /* TIOCGSIZE */
|
||||
bar->width = cols;
|
||||
if(cols > 20)
|
||||
bar->width = cols;
|
||||
}
|
||||
|
||||
if(!bar->width)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue