w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 97076d0cdadce963be63a40c2107012155627b83
parent 11600e7f2f0cf4ce5782e77ccd8fe6b5f726b9a5
Author: ukai <ukai>
Date:   Tue, 26 Nov 2002 16:57:39 +0000

[w3m-dev 03486] fix of displayLineInfo
* display.c (displayBuffer): don't divide by 0
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>

Diffstat:
MChangeLog | 5+++++
Mdisplay.c | 2+-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -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 diff --git a/display.c b/display.c @@ -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