From 781b7eaefeaf14470e21afdf655070e0ea1fd1c6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 15 Jun 2016 01:35:36 +0200 Subject: [PATCH] Fix crash for input from stdin. --- solc/CommandLineInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 571ea2da7..17ab5ba47 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>()); + if (m_args.count("input-file")) + m_compiler->setRemappings(m_args["input-file"].as>()); for (auto const& sourceCode: m_sourceCodes) m_compiler->addSource(sourceCode.first, sourceCode.second); // TODO: Perhaps we should not compile unless requested