mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- added a check to P_VerifyBlockmap to discard all blockmap with blocks whose first entry is not 0.
Seems someone has written a node builder which violates this long-standing assumption (https://www.doomworld.com/vb/source-ports/92468-introducing-zokumbsp/) However, rather than second-guessing the format's correctness it's more advisable to just discard such blockmaps to avoid some less obvious issues that may creep up.
This commit is contained in:
parent
d663f31e77
commit
becc00a8be
1 changed files with 9 additions and 0 deletions
|
@ -2978,6 +2978,15 @@ static bool P_VerifyBlockMap(int count)
|
|||
break;
|
||||
}
|
||||
|
||||
// there's some node builder which carelessly removed the initial 0-entry.
|
||||
// Rather than second-guessing the intent, let's just discard such blockmaps entirely
|
||||
// to be on the safe side.
|
||||
if (*list != 0)
|
||||
{
|
||||
Printf(PRINT_HIGH, "P_VerifyBlockMap: first entry is not 0.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// scan the list for out-of-range linedef indicies in list
|
||||
for(tmplist = list; *tmplist != -1; tmplist++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue