Fixed potential crash in DeHackEd loading

The patch content was destructed and then accessed when loading DeHackEd file of old/unsupported version
Do not print the whole patch content to console but only a filename
This commit is contained in:
alexey.lysiuk 2016-03-08 16:28:11 +02:00
parent 899389e6a4
commit 209b495e10

View file

@ -2505,9 +2505,9 @@ static bool DoDehPatch()
{
if (PatchFile[25] < '3')
{
Printf (PRINT_BOLD, "\"%s\" is an old and unsupported DeHackEd patch\n", PatchName);
delete[] PatchName;
delete[] PatchFile;
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.