mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Fixed excessive growth of ACS string pool
This fixes usage of uninitialized variable in ACSStringPool::PoolEntry objects
The initial version (before 66d15dc
) increased pool size by one entry and assign all its members right after that
The improved version reserved MIN_GC_SIZE entries but didn't initialize anything except the first one
ACSStringPool::FindFirstFreeEntry() cannot find the proper entry as it uses PoolEntry::Next member for list traversal
It's enough to initialize Next member with FREE_ENTRY value because other fields will be assigned anyway inside ACSStringPool::InsertString()
https://forum.zdoom.org/viewtopic.php?t=60049
This commit is contained in:
parent
23146c9b18
commit
5df5e2abe7
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ private:
|
||||||
{
|
{
|
||||||
FString Str;
|
FString Str;
|
||||||
unsigned int Hash;
|
unsigned int Hash;
|
||||||
unsigned int Next;
|
unsigned int Next = FREE_ENTRY;
|
||||||
bool Mark;
|
bool Mark;
|
||||||
TArray<int> Locks;
|
TArray<int> Locks;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue