- replace all \0 characters in Dehacked patches with spaces.

This is needed to make some old and broken patches in some WolfenDoom mods load.
This commit is contained in:
Christoph Oelckers 2015-02-07 15:27:31 +01:00
parent 2d4299608c
commit ec58178695
2 changed files with 7 additions and 1 deletions

View File

@ -694,7 +694,7 @@ void C_DoCommand (const char *cmd, int keynum)
}
else
{
Printf ("Unknown command \"%.*s\"\n", len, beg);
Printf ("Unknown command \"%.*s\"\n", (int)len, beg);
}
}
}

View File

@ -2455,6 +2455,12 @@ static bool DoDehPatch()
Printf (PRINT_BOLD, "\"%s\" is an old and unsupported DeHackEd patch\n", PatchFile);
return false;
}
// fix for broken WolfenDoom patches which contain \0 characters in some places.
for (int i = 0; i < PatchSize; i++)
{
if (PatchFile[i] == 0) PatchFile[i] = ' ';
}
PatchPt = strchr (PatchFile, '\n');
while ((cont = GetLine()) == 1)
{