mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixed: D_dehacked.cpp/PatchThing() allocated an actor on the stack.
SVN r800 (trunk)
This commit is contained in:
parent
1e8064306e
commit
ff387a952c
2 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue