Browse Source

Update src/ens/sequencenumber.c

Support equal values of older and newer
master
Patrick Rathje 4 weeks ago
parent
commit
a87c8928c2
  1. 4
      src/ens/sequencenumber.c

4
src/ens/sequencenumber.c

@ -20,9 +20,9 @@ record_sequence_number_t sn_increment_by(record_sequence_number_t sn, uint32_t a
}
record_sequence_number_t sn_get_middle_sn(record_sequence_number_t older, record_sequence_number_t newer) {
if (older < newer) {
if (older <= newer) {
return GET_MASKED_SN(((older + newer) / 2));
} else {
return GET_MASKED_SN(((older + newer + SN_MASK) / 2));
}
}
}
Loading…
Cancel
Save