diff options
Diffstat (limited to 'std/StandardToken.sol')
-rw-r--r-- | std/StandardToken.sol | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/StandardToken.sol b/std/StandardToken.sol index d2567fec..db453492 100644 --- a/std/StandardToken.sol +++ b/std/StandardToken.sol @@ -12,7 +12,7 @@ contract StandardToken is Token { } function transfer(address _to, uint256 _value) returns (bool success) { - if (balanceOf[msg.sender] >= _value) { + if (balanceOf[msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]) { balanceOf[msg.sender] -= _value; balanceOf[_to] += _value; Transfer(msg.sender, _to, _value); @@ -24,7 +24,7 @@ contract StandardToken is Token { } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { - if (allowance[_from][msg.sender] >= _value) { + if (allowance[_from][msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]) { allowance[_from][msg.sender] -= _value; balanceOf[_to] += _value; Transfer(_from, _to, _value); |