diff options
Diffstat (limited to 'src/zencore/memory')
| -rw-r--r-- | src/zencore/memory/llm.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zencore/memory/llm.cpp b/src/zencore/memory/llm.cpp index fe4853d49..61fa29a66 100644 --- a/src/zencore/memory/llm.cpp +++ b/src/zencore/memory/llm.cpp @@ -15,6 +15,7 @@ static const int32_t TagNamesBaseIndex = 256; static const int32_t TrackedTagNameCount = 256; static const char* TagNames[TrackedTagNameCount]; static uint32_t TagNameHashes[TrackedTagNameCount]; +static int32_t ParentTags[TrackedTagNameCount]; static RwLock TableLock; @@ -46,7 +47,7 @@ FLLMTag::AssignAndAnnounceNewTag(const char* TagName) for (int TagIndex = 0; TagIndex <= CurrentMaxTagIndex; ++TagIndex) { - if (TagNameHashes[TagIndex] == TagNameHash) + if (TagNameHashes[TagIndex] == TagNameHash && ParentTags[TagIndex] == m_ParentTag) { m_Tag = TagIndex + TagNamesBaseIndex; // could verify the string matches here to catch hash collisions @@ -64,6 +65,7 @@ FLLMTag::AssignAndAnnounceNewTag(const char* TagName) { TagNameHashes[TagIndex] = TagNameHash; TagNames[TagIndex] = TagName; + ParentTags[TagIndex] = m_ParentTag; } else { |