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
parent
fc10a7f1ea
commit
f90c162b68
3
misc.h
3
misc.h
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue