Fix IncrementCounterByOne

This was introduced earlier in the day when clearing a Valgrind finding. It tested good with the self tests. However, we double process byte[0] if there's a carry.
pull/853/head
Jeffrey Walton 2019-05-25 07:02:32 -04:00
parent fc10a7f1ea
commit f90c162b68
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 0 additions and 3 deletions

3
misc.h
View File

@ -1232,9 +1232,6 @@ inline void IncrementCounterByOne(byte *inout, unsigned int size)
carry = ! ++inout[size-1]; carry = ! ++inout[size-1];
size--; size--;
} }
if (carry && size == 0)
inout[0]++;
} }
/// \brief Performs an addition with carry on a block of bytes /// \brief Performs an addition with carry on a block of bytes