- Fixed: D_dehacked.cpp/PatchThing() allocated an actor on the stack.

SVN r800 (trunk)
This commit is contained in:
Randy Heit 2008-03-13 00:45:35 +00:00
parent 1e8064306e
commit ff387a952c
2 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,5 @@
March 12, 2008
- Fixed: D_dehacked.cpp/PatchThing() allocated an actor on the stack.
- Changed the sentinels in the thinker lists into a proper thinker. The old
way wasn't playing well with the write barriers.
- Fixed: DFrameBuffer::WriteSavePic needs to fix the canvas in place while

View file

@ -699,7 +699,8 @@ static int PatchThing (int thingy)
};
int result;
AActor *info, dummy;
AActor *info;
BYTE dummy[sizeof(AActor)];
bool hadHeight = false;
bool hadTranslucency = false;
bool hadStyle = false;
@ -709,7 +710,7 @@ static int PatchThing (int thingy)
SWORD *ednum, dummyed;
type = NULL;
info = &dummy;
info = (AActor *)&dummy;
ednum = &dummyed;
if (thingy > NumInfos || thingy <= 0)
{
@ -723,7 +724,7 @@ static int PatchThing (int thingy)
type = PClass::FindClass (GetName (InfoNames[thingy - 1]));
if (type == NULL)
{
info = &dummy;
info = (AActor *)&dummy;
ednum = &dummyed;
Printf ("Could not find thing %s (index %d)\n",
GetName (InfoNames[thingy - 1]), thingy);
@ -1024,7 +1025,7 @@ static int PatchThing (int thingy)
else Printf (unknown_str, Line1, "Thing", thingy);
}
if (info != &dummy)
if (info != (AActor *)&dummy)
{
// Reset heights for things hanging from the ceiling that
// don't specify a new height.