Skip to content

Commit

Permalink
fix: keyexpr equals
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Nov 13, 2024
1 parent e29eae5 commit bc5f1ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/protocol/keyexpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ bool _z_keyexpr_equals(const _z_keyexpr_t *left, const _z_keyexpr_t *right) {
if (_z_keyexpr_mapping_id(left) != _z_keyexpr_mapping_id(right)) {
return false;
}
if (_z_keyexpr_has_suffix(left) || _z_keyexpr_has_suffix(right)) {
bool l_suffix = _z_keyexpr_has_suffix(left);
bool r_suffix = _z_keyexpr_has_suffix(right);
if (l_suffix != r_suffix) {
return false;
}
if (l_suffix && r_suffix) {
return _z_string_equals(&left->_suffix, &right->_suffix);
}
return true;
Expand Down

0 comments on commit bc5f1ea

Please sign in to comment.