- Fixed: The TEXTURES parser could copy beyond the end of a string when parsing

a 'define' definition.


SVN r1263 (trunk)
This commit is contained in:
Christoph Oelckers 2008-10-14 07:57:16 +00:00
parent 738e8ca7ad
commit bca1fc5068
2 changed files with 35 additions and 26 deletions

View file

@ -14,6 +14,10 @@ October 13, 2008
player's inventory when death caused the morph to revert. player's inventory when death caused the morph to revert.
- Updated fmod_wrap.h for FMOD Ex 4.18. - Updated fmod_wrap.h for FMOD Ex 4.18.
October 10, 2008 (Changes by Graf Zahl)
- Fixed: The TEXTURES parser could copy beyond the end of a string when parsing
a 'define' definition.
October 7, 2008 (Changes by Graf Zahl) October 7, 2008 (Changes by Graf Zahl)
- Fixed: Cheats in demos must not access the weapon slots. - Fixed: Cheats in demos must not access the weapon slots.
- Fixed: S_ChannelEnded didn't check for a NULL SfxInfo. - Fixed: S_ChannelEnded didn't check for a NULL SfxInfo.

View file

@ -535,7 +535,11 @@ void FTextureManager::LoadTextureDefs(int wadnum, const char *lumpname)
else if (sc.Compare("define")) // define a new "fake" texture else if (sc.Compare("define")) // define a new "fake" texture
{ {
sc.GetString(); sc.GetString();
memcpy(src, ExtractFileBase(sc.String, false), 8);
FString base = ExtractFileBase(sc.String, false);
if (!base.IsEmpty())
{
strncpy(src, base, 8);
int lumpnum = Wads.CheckNumForFullName(sc.String, true, ns_patches); int lumpnum = Wads.CheckNumForFullName(sc.String, true, ns_patches);
if (lumpnum == -1) lumpnum = Wads.CheckNumForFullName(sc.String, true, ns_graphics); if (lumpnum == -1) lumpnum = Wads.CheckNumForFullName(sc.String, true, ns_graphics);
@ -569,6 +573,7 @@ void FTextureManager::LoadTextureDefs(int wadnum, const char *lumpname)
else AddTexture(newtex); else AddTexture(newtex);
} }
} }
}
//else Printf("Unable to define hires texture '%s'\n", tex->Name); //else Printf("Unable to define hires texture '%s'\n", tex->Name);
} }
else if (sc.Compare("texture")) else if (sc.Compare("texture"))