mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix --help parameter for solfuzzer
the `readStandardInput()` branch would be taken if "input-file" was not given and only "help", thus never reaching the check for "help"
This commit is contained in:
parent
a3a60b8eb9
commit
101ca5c120
@ -84,18 +84,22 @@ Allowed options)",
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arguments.count("quiet"))
|
||||||
|
quiet = true;
|
||||||
|
|
||||||
|
if (arguments.count("help"))
|
||||||
|
{
|
||||||
|
cout << options;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
string input;
|
string input;
|
||||||
if (arguments.count("input-file"))
|
if (arguments.count("input-file"))
|
||||||
input = readFileAsString(arguments["input-file"].as<string>());
|
input = readFileAsString(arguments["input-file"].as<string>());
|
||||||
else
|
else
|
||||||
input = readStandardInput();
|
input = readStandardInput();
|
||||||
|
|
||||||
if (arguments.count("quiet"))
|
if (arguments.count("const-opt"))
|
||||||
quiet = true;
|
|
||||||
|
|
||||||
if (arguments.count("help"))
|
|
||||||
cout << options;
|
|
||||||
else if (arguments.count("const-opt"))
|
|
||||||
FuzzerUtil::testConstantOptimizer(input, quiet);
|
FuzzerUtil::testConstantOptimizer(input, quiet);
|
||||||
else if (arguments.count("standard-json"))
|
else if (arguments.count("standard-json"))
|
||||||
FuzzerUtil::testStandardCompiler(input, quiet);
|
FuzzerUtil::testStandardCompiler(input, quiet);
|
||||||
|
Loading…
Reference in New Issue
Block a user