aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-09-08 23:56:28 +0800
committerchriseth <c@ethdev.com>2016-09-08 23:56:28 +0800
commit6a55405160475fa6166df4888c8d821b4105f879 (patch)
treef0a47a3e3f8276f4b59e03f2ca31a421eb43d3e4 /libsolidity/interface
parentc1b39b8538fc86573f853e9ff1035df9155d61bd (diff)
downloaddexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar.gz
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar.bz2
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar.lz
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar.xz
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.tar.zst
dexon-solidity-6a55405160475fa6166df4888c8d821b4105f879.zip
Fix problem with release version string.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/Version.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libsolidity/interface/Version.cpp b/libsolidity/interface/Version.cpp
index 31ba4afc..0dca1ced 100644
--- a/libsolidity/interface/Version.cpp
+++ b/libsolidity/interface/Version.cpp
@@ -58,12 +58,14 @@ bytes dev::solidity::binaryVersion()
solAssert(i < VersionString.size() && VersionString[i] == '.', "");
++i;
ret.push_back(byte(parseDecimal()));
- solAssert(i < VersionString.size() && VersionString[i] == '-', "");
+ solAssert(i < VersionString.size() && (VersionString[i] == '-' || VersionString[i] == '+'), "");
++i;
+ size_t commitpos = VersionString.find("commit.");
+ solAssert(commitpos != string::npos, "");
+ i = commitpos + 7;
solAssert(i + 7 < VersionString.size(), "");
bytes commitHash = fromHex(VersionString.substr(i, 8));
- if (commitHash.empty())
- commitHash = bytes(4, 0);
+ solAssert(!commitHash.empty(), "");
ret += commitHash;
solAssert(ret.size() == 1 + 3 + 4, "");