SVN r65 (trunk)

This commit is contained in:
Christoph Oelckers 2006-04-23 09:02:19 +00:00
commit b229d07500
6 changed files with 17 additions and 7 deletions

View file

@ -234,9 +234,11 @@ int FTextureManager::CreateTexture (int lumpnum, int usetype)
{
FTexture *out = NULL;
enum { t_patch, t_raw, t_imgz, t_png } type = t_patch;
DWORD first4bytes;
DWORD first4bytes=0;
if (lumpnum < 0)
// Must check the length of the lump. Zero length flat markers (F1_START etc.) will come through here.
// 13 is the minimum length of andthing valid (i.e a 1x1 pixel Doom patch.)
if (lumpnum < 0 || Wads.LumpLength(lumpnum)<13)
{
return -1;
}