aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-01-30 16:48:40 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-01-30 16:48:40 +0000
commit081ef4058cedc1fd93fac864de73724a77a0754c (patch)
treeeb8e2505c429c405a788528de1a57a2f7dbf7c02 /file.c
parent[w3m-dev 03718] Too slow when loading big file with fold_line=1 (diff)
downloadw3m-081ef4058cedc1fd93fac864de73724a77a0754c.tar.gz
w3m-081ef4058cedc1fd93fac864de73724a77a0754c.zip
[w3m-dev 03719] Re: Too slow when loading big file with fold_line=1
* file.c (addnewline): check i <l->len From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 1dd350d..3ab0160 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.216 2003/01/30 16:39:36 ukai Exp $ */
+/* $Id: file.c,v 1.217 2003/01/30 16:48:43 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -6134,7 +6134,7 @@ addnewline(Buffer *buf, char *line, Lineprop *prop,
if (i == 0) {
i++;
#ifdef JP_CHARSET
- if (CharType(p[i]) == PC_KANJI2)
+ if (i < l->len && CharType(p[i]) == PC_KANJI2)
i++;
#endif
}