Skip to content

Commit

Permalink
fix(strings): fix underflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Oct 30, 2024
1 parent 3534946 commit 1d0cbc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tfhe/src/strings/server_key/pattern/split/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl FheStringIterator for SplitNInternal {
// `not_exceeded` false such that next calls are always None
match &self.n {
UIntArg::Clear(clear_n) => {
if self.counter >= clear_n - 1 {
if self.counter + 1 >= *clear_n {
result = state;
self.not_exceeded = sk.create_trivial_boolean_block(false);
}
Expand Down

0 comments on commit 1d0cbc0

Please sign in to comment.