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
This commit is contained in:
psychocrypt
2017-10-27 20:13:19 +02:00
parent 12802f12e3
commit 0117ed609e
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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;
+4 -2
View File
@@ -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