Add missing wrapping_add() caught by test vectors

This commit is contained in:
Jack Grigg 2018-08-01 03:00:19 +01:00
parent 342d97ac15
commit 9c9607e47a
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ impl DiversifierIndex {
pub fn increment(&mut self) -> Result<(), ()> {
let mut k = 0;
loop {
self.0[k] += 1;
self.0[k] = self.0[k].wrapping_add(1);
if self.0[k] != 0 {
// No overflow
return Ok(());