mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- Fixed alloc/dealloc mismatch in PClass code.
The function 'PClassActor::InitializeNativeDefault' is the only one which didn't allocate the 'Defaults' member variable with M_Malloc. Reported by the Address Sanitizer.
This commit is contained in:
parent
4751bffd5f
commit
002177e33f
1 changed files with 1 additions and 1 deletions
|
@ -321,7 +321,7 @@ void PClassActor::InitializeNativeDefaults()
|
|||
{
|
||||
Symbols.SetParentTable(&ParentClass->Symbols);
|
||||
assert(Defaults == NULL);
|
||||
Defaults = new BYTE[Size];
|
||||
Defaults = (BYTE *)M_Malloc(Size);
|
||||
if (ParentClass->Defaults != NULL)
|
||||
{
|
||||
memcpy(Defaults, ParentClass->Defaults, ParentClass->Size);
|
||||
|
|
Loading…
Reference in a new issue