Added handling of any space characters in BEX par times

Back to Saturn X E1: Get Out Of My Stations (https://www.doomworld.com/idgames/levels/doom2/megawads/btsx_e1) uses tabs instead of spaces and bunch of 'Need data after par' warnings were printed during loading
PrBoom supports arbitrary space characters too
This commit is contained in:
alexey.lysiuk 2017-03-18 18:22:46 +02:00
parent 745b96beec
commit 9a10a0f136

View file

@ -2026,7 +2026,20 @@ static int PatchPars (int dummy)
if (stricmp ("par", Line1))
return result;
space = strchr (Line2, ' ');
const auto FindSpace = [](char* str) -> char*
{
while ('\0' != *str)
{
if (isspace(*str))
{
return str;
}
++str;
}
return nullptr;
};
space = FindSpace (Line2);
if (!space) {
Printf ("Need data after par.\n");
@ -2038,7 +2051,7 @@ static int PatchPars (int dummy)
while (*space && isspace(*space))
space++;
moredata = strchr (space, ' ');
moredata = FindSpace (space);
if (moredata) {
// At least 3 items on this line, must be E?M? format