diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6abde8c5c5..db3ce8c45c 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ May 10, 2006 (Changes by Graf Zahl) +- Fixed: PClass::CreateNew didn't check whether the class had valid + defaults and tried to copy data from a NULL pointer. +- Fixed: FireThing and BrassTorch were misspelled in hexendecorations.txt - Changed A_ChangeFlag so that it doesn't need to alter the flag string. With strings being passed as names this is unsafe. - Removed unused parameter types from the function parameter parser for diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index b9292b8fd6..60e29bc590 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -165,7 +165,10 @@ DObject *PClass::CreateNew () const BYTE *mem = (BYTE *)M_Malloc (Size); // Set this object's defaults before constructing it. - memcpy (mem, Defaults, Size); + if (Defaults!=NULL) + memcpy (mem, Defaults, Size); + else + memset (mem, 0, Size); ConstructNative (mem); ((DObject *)mem)->SetClass (const_cast(this)); diff --git a/wadsrc/decorate/hexen/hexendecorations.txt b/wadsrc/decorate/hexen/hexendecorations.txt index c4755078d0..a1310fff39 100644 --- a/wadsrc/decorate/hexen/hexendecorations.txt +++ b/wadsrc/decorate/hexen/hexendecorations.txt @@ -1139,7 +1139,7 @@ ACTOR ZBucket 8103 } } -ACTOR ZFireThing 8060 +ACTOR FireThing 8060 { Game Hexen Radius 5 @@ -1161,7 +1161,7 @@ ACTOR ZFireThing 8060 } } -ACTOR ZBrassTorch 8061 +ACTOR BrassTorch 8061 { Game Hexen Radius 6