gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 34/282: curl:progressbarinit: ignore column width from terminals


From: gnunet
Subject: [gnurl] 34/282: curl:progressbarinit: ignore column width from terminals < 20
Date: Wed, 01 Apr 2020 14:28:19 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit c2feed05bca2a95b4841a71e66c2f7f935386fa9
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Jan 14 22:18:12 2020 +0100

    curl:progressbarinit: ignore column width from terminals < 20
    
    To avoid division by zero - or other issues.
    
    Reported-by: Daniel Marjamäki
    Closes #4818
---
 src/tool_cb_prg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index 9d16ec766..d4c146590 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -251,7 +251,8 @@ void progressbarinit(struct ProgressData *bar,
       }
     }
 #endif /* TIOCGSIZE */
-    bar->width = cols;
+    if(cols > 20)
+      bar->width = cols;
   }
 
   if(!bar->width)

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]