aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-27 12:39:34 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-27 12:39:34 +0000
commit7d15651115d9590e89eb35dec8d090f083e352c6 (patch)
tree5fb1cdc25550bc58a34fd200f5a215d4dce073a9 /src
parente0960727453034ac3e01e20007a9c1b261d1d135 (diff)
don't advance the line pointer if it already points to the null terminator
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index dc7d0f655..6bd153147 100644
--- 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);