diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | display.c | 4 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2002-11-27 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> + + * [w3m-dev 03486] fix of displayLineInfo + * display.c (displayBuffer): don't divide by 0 + 2002-11-26 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> * [w3m-dev 03485] fix mouse menu position @@ -5156,4 +5161,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.558 2002/11/26 03:42:28 ukai Exp $ +$Id: ChangeLog,v 1.559 2002/11/26 16:57:39 ukai Exp $ @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.39 2002/11/25 16:57:16 ukai Exp $ */ +/* $Id: display.c,v 1.40 2002/11/26 16:57:39 ukai Exp $ */ #include <signal.h> #include "fm.h" @@ -330,7 +330,7 @@ displayBuffer(Buffer *buf, int mode) if (displayLineInfo && buf->currentLine != NULL && buf->lastLine != NULL) { int cl = buf->currentLine->real_linenumber; int ll = buf->lastLine->real_linenumber; - int r = (int)((double)cl * 100.0 / (double)ll + 0.5); + int r = (int)((double)cl * 100.0 / (double)(ll ? ll : 1) + 0.5); Strcat(msg, Sprintf("%d/%d (%d%%)", cl, ll, r)); } else |