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:
alexey.lysiuk 2018-04-01 14:35:49 +03:00
parent 23146c9b18
commit 5df5e2abe7
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ private:
{
FString Str;
unsigned int Hash;
unsigned int Next;
unsigned int Next = FREE_ENTRY;
bool Mark;
TArray<int> Locks;