* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org

* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537706#10
* rc.c (interpret_rc): check line->length before call Strchop().
This commit is contained in:
Ito Hiroyuki
2010-07-19 12:25:53 +00:00
parent c71e7b7393
commit 3b6bf23b5a
2 changed files with 12 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
2010-07-19 d+w3m@vdr.jp
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537706#10
* rc.c (interpret_rc): check line->length before call Strchop().
2010-07-19 d+w3m@vdr.jp
* [w3m-dev 04321] Re: w3m's bugs from bugs.debian.org
@@ -9005,4 +9011,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
$Id: ChangeLog,v 1.1012 2010/07/19 12:19:54 htrb Exp $
$Id: ChangeLog,v 1.1013 2010/07/19 12:25:53 htrb Exp $

8
rc.c
View File

@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.109 2010/07/19 12:19:54 htrb Exp $ */
/* $Id: rc.c,v 1.110 2010/07/19 12:25:53 htrb Exp $ */
/*
* Initialization file etc.
*/
@@ -1071,9 +1071,11 @@ interpret_rc(FILE * f)
for (;;) {
line = Strfgets(f);
Strchop(line);
if (line->length == 0)
if (line->length == 0) /* end of file */
break;
Strchop(line);
if (line->length == 0) /* blank line */
continue;
Strremovefirstspaces(line);
if (line->ptr[0] == '#') /* comment */
continue;