about summary refs log tree commit diff
path: root/src/libutil/hash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/hash.cc')
-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 fa1bb5d97183..e6f8aa85c6d8 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -54,6 +54,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;