add comment making explicit that SafeMath.sub can throw

This commit is contained in:
Francisco Giordano
2017-08-29 11:50:02 -03:00
parent dcdc453a55
commit aad25205cd

View File

@ -22,6 +22,7 @@ contract BasicToken is ERC20Basic {
function transfer(address _to, uint256 _value) returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);