diff options
author | chriseth <c@ethdev.com> | 2016-06-15 07:35:36 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-06-15 07:35:36 +0800 |
commit | 781b7eaefeaf14470e21afdf655070e0ea1fd1c6 (patch) | |
tree | 899add126bad034ddac6ae7aeaa287ba98900363 | |
parent | 5f97274a6cc2d9346357d69b2c4a9348cdffa7f9 (diff) | |
download | dexon-solidity-781b7eaefeaf14470e21afdf655070e0ea1fd1c6.tar.gz dexon-solidity-781b7eaefeaf14470e21afdf655070e0ea1fd1c6.tar.zst dexon-solidity-781b7eaefeaf14470e21afdf655070e0ea1fd1c6.zip |
Fix crash for input from stdin.
-rw-r--r-- | solc/CommandLineInterface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 571ea2da..17ab5ba4 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -564,7 +564,8 @@ bool CommandLineInterface::processInput() auto scannerFromSourceName = [&](string const& _sourceName) -> solidity::Scanner const& { return m_compiler->scanner(_sourceName); }; try { - m_compiler->setRemappings(m_args["input-file"].as<vector<string>>()); + if (m_args.count("input-file")) + m_compiler->setRemappings(m_args["input-file"].as<vector<string>>()); for (auto const& sourceCode: m_sourceCodes) m_compiler->addSource(sourceCode.first, sourceCode.second); // TODO: Perhaps we should not compile unless requested |