mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Ensure that address types are always declared as 160bit
This commit is contained in:
1 parent
eb5a6aacd9
commit
ee65ecfb3b
5 files changed
+14
-14
No files matched your search
@@ -162,7 +162,7 @@ string ABIFunctions::cleanupFunction(Type const& _type, bool _revertOnFailure)
|
||||
break;
|
||||
}
|
||||
case Type::Category::Contract:
|
||||
templ("body", "cleaned := " + cleanupFunction(IntegerType(0, IntegerType::Modifier::Address)) + "(value)");
|
||||
templ("body", "cleaned := " + cleanupFunction(IntegerType(160, IntegerType::Modifier::Address)) + "(value)");
|
||||
break;
|
||||
case Type::Category::Enum:
|
||||
{
|
||||
@@ -243,7 +243,7 @@ string ABIFunctions::conversionFunction(Type const& _from, Type const& _to)
|
||||
toCategory == Type::Category::Integer ||
|
||||
toCategory == Type::Category::Contract,
|
||||
"");
|
||||
IntegerType const addressType(0, IntegerType::Modifier::Address);
|
||||
IntegerType const addressType(160, IntegerType::Modifier::Address);
|
||||
IntegerType const& to =
|
||||
toCategory == Type::Category::Integer ?
|
||||
dynamic_cast<IntegerType const&>(_to) :
|
||||
|
||||
Reference in new issue
Block a user