Skip to content

Commit 8ef863c

Browse files
authored
Merge pull request #198 from ChmielewskiKamil/patch-3
docs: fix value boundary
2 parents e8b7524 + 5bfa17e commit 8ef863c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

program-analysis/echidna/property-creation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ We want Echidna to spend most of the execution exploring the contract to test. S
162162
```solidity
163163
function depositShares_never_reverts(uint256 val) public {
164164
if(token.balanceOf(address(this)) > 0) {
165-
val = val % token.balanceOf(address(this));
165+
val = val % (token.balanceOf(address(this)) + 1);
166166
try c.depositShares(val) { /* not reverted */ } catch { assert(false); }
167167
assert(c.getShares(address(this)) > 0);
168168
} else {

0 commit comments

Comments
 (0)