2009-11-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Only decrement cols if cols > 0
	* src/ConsoleStatCalc.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-11-02 14:30:26 +00:00
parent b5136c2028
commit 0894a7592c
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-11-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Only decrement cols if cols > 0
* src/ConsoleStatCalc.cc
2009-11-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated Polish, Catalan, French, Italian, Russian and Japanese

View File

@ -217,8 +217,10 @@ ConsoleStatCalc::calculateStat(const DownloadEngine* e)
if(ioctl(STDOUT_FILENO, TIOCGWINSZ, &size) == 0) {
cols = size.ws_col;
#ifdef __MINGW32__
if(cols > 0) {
// Windows terminal cannot handle at the end of line properly.
--cols;
}
#endif // __MINGW32__
}
#endif // HAVE_TERMIOS_H