curl-library
Re: curlrc parsing
Date: Fri, 23 Jan 2004 09:59:08 +0100 (CET)
On Thu, 22 Jan 2004, Gisle Vanem wrote:
> when _curlrc does *not* end in a newline. I can't see why, but this
> code in parseconfig() (at line 2070):
> /* pass spaces and separator(s) */
> while(isspace((int)*line) || isseparator(*line))
> line++;
Since isspace(newline) will return true, this will pass the newline... Won't
this (simpler) patch fix this problem for you?
diff -u -r1.226 main.c
--- main.c 22 Jan 2004 12:46:07 -0000 1.226
+++ main.c 23 Jan 2004 08:58:05 -0000
@@ -2068,7 +2068,7 @@
#endif
/* pass spaces and separator(s) */
- while(isspace((int)*line) || isseparator(*line))
+ while(*line && (isspace((int)*line) || isseparator(*line)))
line++;
/* the parameter starts here (unless quoted) */
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]] ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdnReceived on 2004-01-23