mirror of
https://github.com/status-im/visual-identity.git
synced 2025-02-08 10:44:33 +00:00
Possible underflows
This commit is contained in:
parent
c5201fc0a6
commit
fe7c0020e1
@ -158,6 +158,9 @@ contract PollManager is Controlled {
|
|||||||
uint amount = p.votes[msg.sender];
|
uint amount = p.votes[msg.sender];
|
||||||
if (amount == 0) return;
|
if (amount == 0) return;
|
||||||
|
|
||||||
|
assert(p.voters != 0);
|
||||||
|
assert(amount <= p.results);
|
||||||
|
|
||||||
p.votes[msg.sender] = 0;
|
p.votes[msg.sender] = 0;
|
||||||
|
|
||||||
p.voters--;
|
p.voters--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user