dont increment address 0 balance

This commit is contained in:
Ricardo Guilherme Schmidt 2018-06-30 01:31:17 -03:00
parent 8b092b421e
commit fa11e1782c
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
1 changed files with 2 additions and 1 deletions

View File

@ -92,9 +92,10 @@ contract StandardToken is ERC20Token {
{
if (balances[_from] >= _value && _value > 0) {
balances[_from] -= _value;
balances[_to] += _value;
if(_to == address(0)) {
supply -= _value;
} else {
balances[_to] += _value;
}
emit Transfer(_from, _to, _value);
return true;