Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
fix constants handling for addition
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Nov 30, 2019
1 parent bcd94f6 commit e1114ee
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -191,7 +191,7 @@ public UInt256 add(long value) {
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;
Expand Down

0 comments on commit e1114ee

Please sign in to comment.