diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
commit | af52480aabcb700c9bf68989a5e6c648d22f9945 (patch) | |
tree | 17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /linein.c | |
parent | Update ChangeLog (diff) | |
parent | Check for presence of prevl before using (diff) | |
download | w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.tar.gz w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.zip |
Merge branch 'bug/sw3m'
Diffstat (limited to 'linein.c')
-rw-r--r-- | linein.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -714,7 +714,8 @@ _rdcompl(void) static void next_dcompl(int next) { - static int col, row, len; + static int col, row; + static unsigned int len; static Str d; int i, j, n, y; Str f; @@ -780,9 +781,10 @@ next_dcompl(int next) if (len < n) len = n; } - col = COLS / len; - if (col == 0) - col = 1; + if (len > 0 && COLS > len) + col = COLS / len; + else + col = 1; row = (NCFileBuf + col - 1) / col; disp_next: |