mirror of https://github.com/moparisthebest/curl
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
|
@ -251,7 +251,8 @@ void progressbarinit(struct ProgressData *bar,
|
|||
}
|
||||
}
|
||||
#endif /* TIOCGSIZE */
|
||||
bar->width = cols;
|
||||
if(cols > 20)
|
||||
bar->width = cols;
|
||||
}
|
||||
|
||||
if(!bar->width)
|
||||
|
|
Loading…
Reference in New Issue