mirror of https://github.com/ZDoom/gzdoom.git
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
|
@ -644,8 +644,12 @@ bool FConfigFile::ReadConfig (void *file)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Do not process tail of long line
|
// Do not process tail of long line
|
||||||
const bool longline = 255 == strlen(readbuf) && '\n' != readbuf[254];
|
const bool longline = (READBUFFERSIZE - 1) == strlen(readbuf) && '\n' != readbuf[READBUFFERSIZE - 2];
|
||||||
if (!longline)
|
if (longline)
|
||||||
|
{
|
||||||
|
endpt = start + READBUFFERSIZE - 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Remove white space at end of line
|
// Remove white space at end of line
|
||||||
endpt = start + strlen (start) - 1;
|
endpt = start + strlen (start) - 1;
|
||||||
|
|
Loading…
Reference in New Issue