diff --git a/contracts/ECRecovery.sol b/contracts/ECRecovery.sol index 580e5a66d..bd4b162ee 100644 --- a/contracts/ECRecovery.sol +++ b/contracts/ECRecovery.sol @@ -62,7 +62,11 @@ library ECRecovery { bool ret; address addr; (ret, addr) = safeRecover(hash, v, r, s); - return addr; + + if (!ret) + return address(0); + else + return addr; } }