aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/hash.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index 6b45ac859..817ddc0b8 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -45,6 +45,8 @@ bool Hash::operator != (const Hash & h2) const
bool Hash::operator < (const Hash & h) const
{
+ if (hashSize < h.hashSize) return true;
+ if (hashSize > h.hashSize) return false;
for (unsigned int i = 0; i < hashSize; i++) {
if (hash[i] < h.hash[i]) return true;
if (hash[i] > h.hash[i]) return false;