Commit f0733526 by Francisco Giordano Committed by GitHub

Merge pull request #416 from frangio/add-comment-basictoken-throw

Add comment making explicit that transfer throws without enough balance
parents dcdc453a aad25205
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment