Commit b4406d38 by chriseth Committed by Francisco Giordano

Use abi.encodeWithSignature together with raw call() (#1008)

parent 78e39aa2
......@@ -24,11 +24,10 @@ contract ReentrancyMock is ReentrancyGuard {
}
function countThisRecursive(uint256 n) public nonReentrant {
bytes4 func = bytes4(keccak256("countThisRecursive(uint256)"));
if (n > 0) {
count();
// solium-disable-next-line security/no-low-level-calls
bool result = address(this).call(func, n - 1);
bool result = address(this).call(abi.encodeWithSignature("countThisRecursive(uint256)", n - 1));
require(result == true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment