Commit 7d156511 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

don't advance the line pointer if it already points to the null terminator

parent e0960727
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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,6 +2059,7 @@ static int parseconfig(const char *filename,
        line++;
      /* ... and has ended here */

      if(*line)
        *line++=0; /* zero terminate, we have a local copy of the data */

#ifdef DEBUG_CONFIG