Store integer range as full 64 bits

This commit is contained in:
Adam Ierymenko 2022-09-29 17:08:50 -04:00
parent 3591f9045e
commit a31f413eeb
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3

View file

@ -358,7 +358,7 @@ impl Rule {
not, not,
or, or,
self.v.int_range.start, self.v.int_range.start,
self.v.int_range.start.wrapping_add(self.v.int_range.end as u64), self.v.int_range.end,
self.v.int_range.idx, self.v.int_range.idx,
self.v.int_range.format, self.v.int_range.format,
), ),
@ -458,7 +458,7 @@ impl Marshalable for Rule {
match_cond::INTEGER_RANGE => { match_cond::INTEGER_RANGE => {
buf.append_u8(19)?; buf.append_u8(19)?;
buf.append_u64(self.v.int_range.start)?; buf.append_u64(self.v.int_range.start)?;
buf.append_u64(self.v.int_range.start.wrapping_add(self.v.int_range.end as u64))?; buf.append_u64(self.v.int_range.end)?;
buf.append_u16(self.v.int_range.idx)?; buf.append_u16(self.v.int_range.idx)?;
buf.append_u8(self.v.int_range.format)?; buf.append_u8(self.v.int_range.format)?;
} }