Update libsolidity/codegen/YulUtilFunctions.cpp

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Đorđe Mijović 2020-06-15 20:25:21 +02:00 committed by GitHub
parent 48e8f27d05
commit 86e43501f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2515,8 +2515,13 @@ string YulUtilFunctions::revertReasonIfDebugAssembly(RevertStrings _revertString
templ("debugAndMessage", debugAndMessage); templ("debugAndMessage", debugAndMessage);
if (debugAndMessage) if (debugAndMessage)
{ {
templ("sig", (u256(util::FixedHash<4>::Arith(util::FixedHash<4>(util::keccak256("Error(string)")))) templ(
<< (256 - 32)).str()); "sig",
(
u256(util::FixedHash<4>::Arith(util::FixedHash<4>(util::keccak256("Error(string)")))) <<
(256 - 32)
).str()
);
templ("length", to_string(_message.length())); templ("length", to_string(_message.length()));
size_t words = (_message.length() + 31) / 32; size_t words = (_message.length() + 31) / 32;