diff options
Diffstat (limited to 'docs/security-considerations.rst')
-rw-r--r-- | docs/security-considerations.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index 066a31ea..3bcd9566 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -86,7 +86,8 @@ as it uses ``call`` which forwards all remaining gas by default: mapping(address => uint) shares; /// Withdraw your share. function withdraw() public { - if (msg.sender.call.value(shares[msg.sender])("")) + (bool success,) = msg.sender.call.value(shares[msg.sender])(""); + if (success) shares[msg.sender] = 0; } } |