mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
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:
parent
745b96beec
commit
9a10a0f136
1 changed files with 15 additions and 2 deletions
|
@ -2026,7 +2026,20 @@ static int PatchPars (int dummy)
|
||||||
if (stricmp ("par", Line1))
|
if (stricmp ("par", Line1))
|
||||||
return result;
|
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) {
|
if (!space) {
|
||||||
Printf ("Need data after par.\n");
|
Printf ("Need data after par.\n");
|
||||||
|
@ -2038,7 +2051,7 @@ static int PatchPars (int dummy)
|
||||||
while (*space && isspace(*space))
|
while (*space && isspace(*space))
|
||||||
space++;
|
space++;
|
||||||
|
|
||||||
moredata = strchr (space, ' ');
|
moredata = FindSpace (space);
|
||||||
|
|
||||||
if (moredata) {
|
if (moredata) {
|
||||||
// At least 3 items on this line, must be E?M? format
|
// At least 3 items on this line, must be E?M? format
|
||||||
|
|
Loading…
Reference in a new issue