Fix a subtle thinko in dbiIndexItem less-than comparison

This subtlety in commit 52f311e224 resulted
in not-so-subtle crash due to sort going out of bounds.
This commit is contained in:
Panu Matilainen 2024-06-14 11:55:04 +03:00
parent 558793e2b9
commit 17739baf98
1 changed files with 3 additions and 3 deletions

View File

@ -12,9 +12,9 @@ using std::vector;
bool dbiIndexItem_s::operator < (const dbiIndexItem_s & other) const
{
if (hdrNum < other.hdrNum)
return true;
return tagNum < other.tagNum;
if (hdrNum == other.hdrNum)
return tagNum < other.tagNum;
return hdrNum < other.hdrNum;
}
bool dbiIndexItem_s::operator == (const dbiIndexItem_s & other) const