Skip to content

Commit eba3f22

Browse files
committed
equality check bugs
1 parent 629b7aa commit eba3f22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/sketch/sketch_columns.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ class ResizeableSketchColumn {
122122
}
123123

124124
bool operator==(const ResizeableSketchColumn &other) const {
125-
for (size_t i = 0; i < capacity; ++i) {
125+
size_t other_depth = other.get_depth();
126+
if (get_depth() != other_depth) {
127+
return false;
128+
}
129+
for (size_t i = 0; i < other_depth; ++i) {
126130
if (aligned_buckets[i] != other.aligned_buckets[i]) {
127131
return false;
128132
}

0 commit comments

Comments
 (0)