Properly handle colons in file names within jsonio

This commit is contained in:
Alex Beregszaszi
2018-01-03 15:44:03 +00:00
parent fdbe78a769
commit ff9fdfac57
3 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -461,7 +461,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
Json::Value contractsOutput = Json::objectValue;
for (string const& contractName: compilationSuccess ? m_compilerStack.contractNames() : vector<string>())
{
size_t colon = contractName.find(':');
size_t colon = contractName.rfind(':');
solAssert(colon != string::npos, "");
string file = contractName.substr(0, colon);
string name = contractName.substr(colon + 1);