From 3b6bf23b5a4305fcb62856d92db00749b3dc3d40 Mon Sep 17 00:00:00 2001 From: Ito Hiroyuki Date: Mon, 19 Jul 2010 12:25:53 +0000 Subject: * [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(). --- rc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rc.c') diff --git a/rc.c b/rc.c index c8daa4c..ab2b2c5 100644 --- a/rc.c +++ b/rc.c @@ -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; -- cgit v1.2.3