From f90c162b68a8878f0f633cad03f851f7110af431 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 25 May 2019 07:02:32 -0400 Subject: [PATCH] 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. --- misc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/misc.h b/misc.h index 52ece09c..d836aaa2 100644 --- a/misc.h +++ b/misc.h @@ -1232,9 +1232,6 @@ inline void IncrementCounterByOne(byte *inout, unsigned int size) carry = ! ++inout[size-1]; size--; } - - if (carry && size == 0) - inout[0]++; } /// \brief Performs an addition with carry on a block of bytes