diff options
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 2b280dd5..a1e6deb0 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -181,6 +181,10 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) for (auto const& sourceName: sources.getMemberNames()) { string hash; + + if (!sources[sourceName].isObject()) + return formatFatalError("JSONError", "Source input is not a JSON object."); + if (sources[sourceName]["keccak256"].isString()) hash = sources[sourceName]["keccak256"].asString(); |