added check to ret boolean on ECRecovery

This commit is contained in:
Augusto
2017-06-15 20:24:17 -03:00
committed by Francisco Giordano
parent 641b751385
commit 227c7aae0f

View File

@ -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;
}
}