Support whitespace at end of line for config reader.

This commit addresses issue #624
This commit is contained in:
Seth Hall 2019-10-14 11:43:16 -04:00
parent 48873570b5
commit cd06cb24cc
3 changed files with 19 additions and 17 deletions

View file

@ -199,7 +199,7 @@ bool Config::DoUpdate()
}
regex_t re;
if ( regcomp(&re, "^([^[:blank:]]+)[[:blank:]]+(.*)$", REG_EXTENDED) )
if ( regcomp(&re, "^([^[:blank:]]+)[[:blank:]]+(.*[^[:blank:]])[[:blank:]]*$", REG_EXTENDED) )
{
Error(Fmt("Failed to compile regex."));
return true;