mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix segfault when using wrong number of constructor arguments.
This commit is contained in:
parent
23074150f4
commit
4a837169c5
@ -504,6 +504,7 @@ void TypeChecker::visitManually(
|
||||
return;
|
||||
}
|
||||
if (parameters->size() != arguments.size())
|
||||
{
|
||||
typeError(
|
||||
_modifier.location(),
|
||||
"Wrong argument count for modifier invocation: " +
|
||||
@ -512,6 +513,8 @@ void TypeChecker::visitManually(
|
||||
toString(parameters->size()) +
|
||||
"."
|
||||
);
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < _modifier.arguments().size(); ++i)
|
||||
if (!type(*arguments[i])->isImplicitlyConvertibleTo(*type(*(*parameters)[i])))
|
||||
typeError(
|
||||
|
Loading…
Reference in New Issue
Block a user