- Fixed a KEYCONF parser issue with empty lines.

The code attempted to access an array outside its bounds when it tried to parse empty lines.
Discovered with the Address Sanitizer.
This commit is contained in:
Edoardo Prezioso 2015-07-16 19:43:30 +02:00
parent add52d48cd
commit 99683f0e7d
1 changed files with 5 additions and 0 deletions

View File

@ -177,6 +177,11 @@ void D_LoadWadSettings ()
{ {
cmd[i] = conf[i]; cmd[i] = conf[i];
} }
if (i == 0)
{
conf++;
continue;
}
cmd[i] = 0; cmd[i] = 0;
conf += i; conf += i;
if (*conf == '\n') if (*conf == '\n')