From 59a355c5f7ca0dff9cadf7dbebdaadbf969796b9 Mon Sep 17 00:00:00 2001 From: nnposter Date: Fri, 7 Aug 2026 19:31:59 +0000 Subject: [PATCH] Fix comparison of StringPoolItem(s) of different lengths. Close #3427 --- string_pool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string_pool.cc b/string_pool.cc index f9cf9f936..99de9607f 100644 --- a/string_pool.cc +++ b/string_pool.cc @@ -90,7 +90,7 @@ class StringPoolItem { // asdfq <> asdf bool operator< (const StringPoolItem& other) const { - return this->len < other.len || memcmp(this->str, other.str, other.len) < 0; + return this->len < other.len || this->len == other.len && memcmp(this->str, other.str, other.len) < 0; } };