diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-06-29 23:38:33 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-09-07 16:20:36 +0200 |
commit | a9874310c0f67c80a1f04854c5c9ed154e1bbf97 (patch) | |
tree | 934b8eda67e8e36b9219eae5a56b96258690284c /src | |
parent | 32d75a7ffc718eff291978bc8c9406037e327c7e (diff) | |
download | bitcoin-a9874310c0f67c80a1f04854c5c9ed154e1bbf97.tar.xz |
[util] CopyrightHolders: Check for untranslated substitution
Also, remove check which is always true
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp index 9a9209c621..ee12f2b443 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -801,11 +801,10 @@ int GetNumCores() std::string CopyrightHolders(const std::string& strPrefix) { - std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS); - if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) { - strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION)); - } - if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) { + std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION)); + + // Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident + if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) { strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers"; } return strCopyrightHolders; |