forked from markus/S_New4
error: nimmt zahl aus schleife für position von . her
This commit is contained in:
parent
39ca4722c5
commit
19b16f1d15
@ -1047,13 +1047,16 @@ int setS5ProxytoSettings(Settings &settings, std::string Optarg)
|
|||||||
//Überprüfe ob Ip aus 4 * '.' besteht und dann eine Zahl ist:
|
//Überprüfe ob Ip aus 4 * '.' besteht und dann eine Zahl ist:
|
||||||
std::string tmpIp = settings.proxy_ip;
|
std::string tmpIp = settings.proxy_ip;
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
if(tmpIp.find(".") != std::string::npos)
|
if(tmpIp.find(".") != std::string::npos) {
|
||||||
tmpIp.erase(static_cast<size_t>(i), 1);
|
tmpIp.erase(static_cast<size_t>(tmpIp.find(".")), 1);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl;
|
std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl;
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
std::cout << " nach Loop: " << tmpIp << std::endl;
|
||||||
|
|
||||||
if(!isNumber(tmpIp)) {
|
if(!isNumber(tmpIp)) {
|
||||||
std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl;
|
std::cout << " => Error: Ungültige Socks5 Proxy Ip Addresse: " << settings.proxy_ip << std::endl;
|
||||||
return 4;
|
return 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user