diff --git a/parameterManager.cpp b/parameterManager.cpp index 0e0a3c3..7f02988 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -1047,13 +1047,16 @@ int setS5ProxytoSettings(Settings &settings, std::string Optarg) //Überprüfe ob Ip aus 4 * '.' besteht und dann eine Zahl ist: std::string tmpIp = settings.proxy_ip; for (int i = 0; i < 4; ++i) { - if(tmpIp.find(".") != std::string::npos) - tmpIp.erase(static_cast(i), 1); + if(tmpIp.find(".") != std::string::npos) { + tmpIp.erase(static_cast(tmpIp.find(".")), 1); + } else { std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl; return 3; } } + std::cout << " nach Loop: " << tmpIp << std::endl; + if(!isNumber(tmpIp)) { std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl; return 4;