fix typo in costs modifier (#850)

This commit is contained in:
gl367 2016-08-16 10:26:57 -04:00 committed by chriseth
parent dbc95570cb
commit c547f9c24b

View File

@ -82,13 +82,13 @@ restrictions highly readable.
// refunded, but only after the function body.
// This is dangerous, because if the function
// uses `return` explicitly, this will not be
// done!
// done! This behavior will be fixed in Version 0.4.0.
modifier costs(uint _amount) {
if (msg.value < _amount)
throw;
_
if (msg.value > _amount)
msg.sender.send(_amount - msg.value);
msg.sender.send(msg.value - _amount);
}
function forceOwnerChange(address _newOwner)
@ -163,7 +163,9 @@ function finishes.
the code in the transitionNext modifier
can be skipped if the function itself uses
return. If you want to do that, make sure
to call nextStage manually from those functions.
to call nextStage manually from those functions.
With version 0.4.0 (unreleased), modifier code
will run even if the function explicitly returns.
::