Bad equality in the emission of the event RapBattle::Battle
might return wrong values
Inside the function RapBattle::_battle
we have the following snippet:
As you can see, if the value of random
and defenderRapperSkill
are the same, the event emits that the winner is the attacker(msg.sender). However, when giving the rewards, if those variables are equal, the rewards are sent to the defender!
The event might emit wrong information
Manual Review
Use <=
instead of <
inside the emit command :
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.