Open dovgopoly opened 8 hours ago
Hi, I noticed a potential bug in the _add function when recalculating bitlen. Consider a scenario where the most significant word is already 1 and remains unchanged. In this case, the algorithm incorrectly calculates the result bitlen.
_add
bitlen
stack.add( "0x010000000000000000000000000000000000000000000000000000000000000001", "0x01" );
The result bitlen is 258 but it's expected to be 257.
Hi, I noticed a potential bug in the
_add
function when recalculatingbitlen
. Consider a scenario where the most significant word is already 1 and remains unchanged. In this case, the algorithm incorrectly calculates the resultbitlen
.The result
bitlen
is 258 but it's expected to be 257.