mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Fixed minor issues in config file reader
Removed hardcoded values from long lines handling and made sure that pointer to the last character is always initialized
This commit is contained in:
parent
27376b1697
commit
5d3244c3a7
1 changed files with 6 additions and 2 deletions
|
@ -644,8 +644,12 @@ bool FConfigFile::ReadConfig (void *file)
|
|||
continue;
|
||||
}
|
||||
// Do not process tail of long line
|
||||
const bool longline = 255 == strlen(readbuf) && '\n' != readbuf[254];
|
||||
if (!longline)
|
||||
const bool longline = (READBUFFERSIZE - 1) == strlen(readbuf) && '\n' != readbuf[READBUFFERSIZE - 2];
|
||||
if (longline)
|
||||
{
|
||||
endpt = start + READBUFFERSIZE - 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove white space at end of line
|
||||
endpt = start + strlen (start) - 1;
|
||||
|
|
Loading…
Reference in a new issue