Fix comparison of StringPoolItem(s) of different lengths. Close #3427

This commit is contained in:
nnposter 2026-08-07 19:31:59 +00:00
parent b6727c3de6
commit 59a355c5f7

View file

@ -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;
}
};