Fix set & map (extra) find
This commit is contained in:
+2
-2
@@ -51,7 +51,7 @@ int libcdsb_vset_find(vtype_set* x, const void* v, vtype t, void* _, vset_access
|
||||
|
||||
while (!rbnode_is_empty(c)) {
|
||||
val = vnode_peek(&c->value, x->type);
|
||||
cmp = vtype_compare(val, x->type, v, t);
|
||||
cmp = vtype_compare(v, t, val, x->type);
|
||||
|
||||
if (cmp == 0) {
|
||||
cmp = (callback) ? callback(val, x->type, _) : 0;
|
||||
@@ -63,7 +63,7 @@ int libcdsb_vset_find(vtype_set* x, const void* v, vtype t, void* _, vset_access
|
||||
}
|
||||
|
||||
return cmp;
|
||||
}
|
||||
} else c = (cmp < 0) ? c->left : c->right;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user