mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
fix problem when download file smaller than 74bytes..
This commit is contained in:
parent
8fc2c35ac4
commit
fe4c321b6c
|
|
@ -23,8 +23,8 @@ size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) {
|
|||
int i;
|
||||
w=s_cat2(w,q("["));
|
||||
for(i=0;i<download_width;++i)
|
||||
w=s_cat2(w,q((i>=(download_count/(content_length/(download_width)))?" ":"#")));
|
||||
w=s_cat2(w,qsprintf(8,"]%3d%%",(100*(download_count/100))/(content_length/100)));
|
||||
w=s_cat2(w,q(((i>=(download_count*download_width)/content_length)?" ":"#")));
|
||||
w=s_cat2(w,qsprintf(8,"]%3d%%",(100*download_count)/content_length));
|
||||
}else {
|
||||
int current,aux;
|
||||
aux=1024>download_count?' ':1024*1024>download_count?(current=download_count/1024,'K'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue