diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-12-25 21:13:59 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-12-25 21:13:59 +0200 |
commit | 2f09828ea8171b3740935c83a7fef7653c27c4c2 (patch) | |
tree | 885dcd3213c3188ed0ab5ce15070fb923be7e0ae /src | |
parent | Merge pull request #2888 (diff) | |
parent | version: add -master to master version (diff) | |
download | monero-2f09828ea8171b3740935c83a7fef7653c27c4c2.tar.xz |
Merge pull request #2890
83b0f9e6 version: add -master to master version (moneromooo-monero)
493f7d09 util: allow non numeric version parts (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.cpp | 14 | ||||
-rw-r--r-- | src/version.cpp.in | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp index d9e12ffe4..2a2f50c4f 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -635,13 +635,13 @@ std::string get_nix_version_display_string() int vercmp(const char *v0, const char *v1) { std::vector<std::string> f0, f1; - boost::split(f0, v0, boost::is_any_of(".")); - boost::split(f1, v1, boost::is_any_of(".")); - while (f0.size() < f1.size()) - f0.push_back("0"); - while (f1.size() < f0.size()) - f1.push_back("0"); - for (size_t i = 0; i < f0.size(); ++i) { + boost::split(f0, v0, boost::is_any_of(".-")); + boost::split(f1, v1, boost::is_any_of(".-")); + for (size_t i = 0; i < std::max(f0.size(), f1.size()); ++i) { + if (i >= f0.size()) + return -1; + if (i >= f1.size()) + return 1; int f0i = atoi(f0[i].c_str()), f1i = atoi(f1[i].c_str()); int n = f0i - f1i; if (n) diff --git a/src/version.cpp.in b/src/version.cpp.in index d1444f867..18d62db6b 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_MONERO_VERSION_TAG "@VERSIONTAG@" -#define DEF_MONERO_VERSION "0.11.0.0" +#define DEF_MONERO_VERSION "0.11.1.0-master" #define DEF_MONERO_RELEASE_NAME "Helium Hydra" #define DEF_MONERO_VERSION_FULL DEF_MONERO_VERSION "-" DEF_MONERO_VERSION_TAG |