Skip to content

Commit b8b73bc

Browse files
committed
write_index, again
1 parent f9e0a67 commit b8b73bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/num/dec2flt/decimal_seq.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ impl DecimalSeq {
139139
#[safety::loop_invariant(read_index <= Self::MAX_DIGITS &&
140140
write_index == read_index + num_new_digits &&
141141
n < 10u64 << (shift - 1) &&
142+
(n == 0 || write_index > 0) &&
142143
self.num_digits <= Self::MAX_DIGITS &&
143144
self.decimal_point <= self.num_digits as i32 &&
144145
forall!(|i in (0,DecimalSeq::MAX_DIGITS)| self.digits[i] <= 9)

0 commit comments

Comments
 (0)