diff --git a/src/common/config.c b/src/common/config.c index ca6db69ad2c0f5f1f5171d3e9c246616e2527608..886da572e5269a31276377af23b641499c97bfd0 100644 --- a/src/common/config.c +++ b/src/common/config.c @@ -80,12 +80,12 @@ int Config_ParseFile(const char *Filename) } } - while( i --, isspace(line[i]) ) - line[i] = 0; + // Trim trailing whitespace + while( i -- && isspace(line[i]) ) + line[i] = '\0'; } - - if( regexec(®exp_empty, line, 1, matches, 0) == 0 ) + if( line[0] == '\0' ) // regexec(®exp_empty, line, 1, matches, 0) == 0 ) continue ; if( RunRegex(®exp_option, line, 3, matches, "Parsing configuration file") )