From 19b16f1d15f2f5f15167075eb780ecbe4b6d237a Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 31 Aug 2019 20:01:18 +0200 Subject: [PATCH] =?UTF-8?q?error:=20nimmt=20zahl=20aus=20schleife=20f?= =?UTF-8?q?=C3=BCr=20position=20von=20.=20her?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parameterManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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;