Fix for #400: Check that destination of token transfers is not 0x
This commit is contained in:
committed by
Francisco Giordano
parent
307d34e05a
commit
209e2de93b
@ -20,6 +20,8 @@ contract BasicToken is ERC20Basic {
|
||||
* @param _value The amount to be transferred.
|
||||
*/
|
||||
function transfer(address _to, uint256 _value) returns (bool) {
|
||||
require(_to != address(0));
|
||||
|
||||
balances[msg.sender] = balances[msg.sender].sub(_value);
|
||||
balances[_to] = balances[_to].add(_value);
|
||||
Transfer(msg.sender, _to, _value);
|
||||
|
||||
Reference in New Issue
Block a user