projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e096072
)
don't advance the line pointer if it already points to the null terminator
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 27 Jan 2004 12:39:34 +0000
(12:39 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Tue, 27 Jan 2004 12:39:34 +0000
(12:39 +0000)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
dc7d0f6
..
6bd1531
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-2039,7
+2039,7
@@
static int parseconfig(const char *filename,
alloced_param=FALSE;
/* lines with # in the fist column is a comment! */
- while(isspace((int)*line))
+ while(
*line &&
isspace((int)*line))
line++;
switch(*line) {
@@
-2059,7
+2059,8
@@
static int parseconfig(const char *filename,
line++;
/* ... and has ended here */
- *line++=0; /* zero terminate, we have a local copy of the data */
+ if(*line)
+ *line++=0; /* zero terminate, we have a local copy of the data */
#ifdef DEBUG_CONFIG
fprintf(stderr, "GOT: %s\n", option);