diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 20:08:24 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-10-27 20:13:19 +0200 |
commit | 0117ed609e69af977fabaf9c28bbf8cf1300ee89 (patch) | |
tree | fe71edd305f523021c9038dab5595551c7e4c7e2 /xmrstak | |
parent | 12802f12e30f57c2a9eefca2c1a5955275c95127 (diff) | |
download | xmr-stak-0117ed609e69af977fabaf9c28bbf8cf1300ee89.zip xmr-stak-0117ed609e69af977fabaf9c28bbf8cf1300ee89.tar.gz |
fix bug inserted during `xmr/monero` renaming
- fix that currency selection is not called (in cli-miner.cpp)
- fix guard to prevent wrong currency selection if compiled for monero or aeon only
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 2 | ||||
-rw-r--r-- | xmrstak/jconf.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index c15ca56..f571ad6 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -255,7 +255,7 @@ int main(int argc, char *argv[]) #elif defined(CONF_NO_MONERO) tmp = "aeon"; #endif - while(xmrstak::strcmp_i(tmp, "monero") && xmrstak::strcmp_i(tmp, "aeon")) + while(!xmrstak::strcmp_i(tmp, "monero") && !xmrstak::strcmp_i(tmp, "aeon")) { std::cout<<"- currency: 'monero' or 'aeon'"<<std::endl; std::cin >> tmp; diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp index 5ada0d6..4b23ed5 100644 --- a/xmrstak/jconf.cpp +++ b/xmrstak/jconf.cpp @@ -159,13 +159,15 @@ const std::string jconf::GetCurrency() currency = prv->configValues[sCurrency]->GetString(); if( #ifndef CONF_NO_MONERO - xmrstak::strcmp_i(currency, "monero") + // if monero is disabled at compile time, enable error message if selected currency is `monero` + !xmrstak::strcmp_i(currency, "monero") #else true #endif && #ifndef CONF_NO_AEON - xmrstak::strcmp_i(currency, "aeon") + // if aeon is disabled at compile time, enable error message if selected currency is `aeon` + !xmrstak::strcmp_i(currency, "aeon") #else true #endif |