mirror of
https://github.com/status-im/contracts.git
synced 2025-02-23 20:18:42 +00:00
dont increment address 0 balance
This commit is contained in:
parent
8b092b421e
commit
fa11e1782c
@ -92,9 +92,10 @@ contract StandardToken is ERC20Token {
|
|||||||
{
|
{
|
||||||
if (balances[_from] >= _value && _value > 0) {
|
if (balances[_from] >= _value && _value > 0) {
|
||||||
balances[_from] -= _value;
|
balances[_from] -= _value;
|
||||||
balances[_to] += _value;
|
|
||||||
if(_to == address(0)) {
|
if(_to == address(0)) {
|
||||||
supply -= _value;
|
supply -= _value;
|
||||||
|
} else {
|
||||||
|
balances[_to] += _value;
|
||||||
}
|
}
|
||||||
emit Transfer(_from, _to, _value);
|
emit Transfer(_from, _to, _value);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user