This is an automated email from the ASF dual-hosted git repository.

toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git


The following commit(s) were added to refs/heads/master by this push:
     new e1114ee  fix constants handling for addition
e1114ee is described below

commit e1114ee773dbf032607161bd6912efff07af2ea2
Author: Antoine Toulme <[email protected]>
AuthorDate: Sat Nov 30 14:34:52 2019 -0800

    fix constants handling for addition
---
 units/src/main/java/org/apache/tuweni/units/bigints/UInt256.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/units/src/main/java/org/apache/tuweni/units/bigints/UInt256.java 
b/units/src/main/java/org/apache/tuweni/units/bigints/UInt256.java
index 4ade4ac..3a270d7 100644
--- a/units/src/main/java/org/apache/tuweni/units/bigints/UInt256.java
+++ b/units/src/main/java/org/apache/tuweni/units/bigints/UInt256.java
@@ -191,7 +191,7 @@ public final class UInt256 implements UInt256Value<UInt256> 
{
     result[INTS_SIZE - 2] = (int) (sum & LONG_MASK);
     constant &= result[INTS_SIZE - 2] == 0;
     long signExtent = (value >> 63) & LONG_MASK;
-    for (int i = INTS_SIZE - 2; i >= 0; --i) {
+    for (int i = INTS_SIZE - 3; i >= 0; --i) {
       sum = (this.ints[i] & LONG_MASK) + signExtent + (sum >>> 32);
       result[i] = (int) (sum & LONG_MASK);
       constant &= result[i] == 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to