Skip to content

Commit

Permalink
fix for a+=value
Browse files Browse the repository at this point in the history
  • Loading branch information
kKahina committed Aug 13, 2024
1 parent 8153236 commit 1870b71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/contracts/Non-Secret-Array.zol
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ contract Assign {
secret uint256 private a;
secret uint256 private b;
uint256 public index;
uint256 public d;
uint256 [3] public c;

function add( uint256 value) public {
require(index < c.length, "Index out of bounds");
c[index] += value;
}

function add1( uint256 value) public {
require(index < c.length, "Index out of bounds");
c[index] += value;
known a +=d;
known a +=value;

}

function add2( uint256 value) public {
require(index < c.length, "Index out of bounds");
c[index] += value;
known a += value;
}
Expand Down

0 comments on commit 1870b71

Please sign in to comment.