mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Don't abort for TEXTUREx lumps that define textures with no patches
- A texture defined in TEXTUREx without any patches isn't necessarily an error, so accept. This also means they shouldn't be used for determining if a TEXTURE directory belongs to Strife instead of Doom.
This commit is contained in:
parent
b0371e1804
commit
260ce62175
1 changed files with 3 additions and 3 deletions
|
@ -233,13 +233,13 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
|
|||
NumParts = SAFESHORT(mtexture.d->patchcount);
|
||||
}
|
||||
|
||||
if (NumParts <= 0)
|
||||
if (NumParts < 0)
|
||||
{
|
||||
I_FatalError ("Bad texture directory");
|
||||
}
|
||||
|
||||
UseType = FTexture::TEX_Wall;
|
||||
Parts = new TexPart[NumParts];
|
||||
Parts = NumParts > 0 ? new TexPart[NumParts] : NULL;
|
||||
Width = SAFESHORT(mtexture.d->width);
|
||||
Height = SAFESHORT(mtexture.d->height);
|
||||
strncpy (Name, (const char *)mtexture.d->name, 8);
|
||||
|
@ -906,7 +906,7 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int d
|
|||
|
||||
// There is bizzarely a Doom editing tool that writes to the
|
||||
// first two elements of columndirectory, so I can't check those.
|
||||
if (SAFESHORT(tex->patchcount) <= 0 ||
|
||||
if (SAFESHORT(tex->patchcount) < 0 ||
|
||||
tex->columndirectory[2] != 0 ||
|
||||
tex->columndirectory[3] != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue