Skip to content

Commit

Permalink
bug fix for withdrawing money
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Waas committed Mar 13, 2018
1 parent aca4008 commit 58f05a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/roulette.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ contract roulette is owned {
function retrieveMoney() external {
require (registeredFunds[msg.sender] > 0);

uint256 funds = registeredFunds[msg.sender];
registeredFunds[msg.sender] = 0;
FundsChanged(msg.sender);

msg.sender.transfer(registeredFunds[msg.sender]);
msg.sender.transfer(funds);
}

function placeBet(bool _bet, bytes32 _hash) external payable {
Expand Down

0 comments on commit 58f05a6

Please sign in to comment.