diff --git a/src/parameterManager.h b/src/parameterManager.h index ef022bc..f25efe1 100644 --- a/src/parameterManager.h +++ b/src/parameterManager.h @@ -81,7 +81,7 @@ struct Settings { proxy_ip = "127.0.0.1", languages = "GerDub,GerSub,Eng,", genaueHoster = "", - version = "3.7.1", + version = "3.7.2", defaultFileVersion="1.6", outputFilePath = "", default_checkPath = "", diff --git a/src/programManager.cpp b/src/programManager.cpp index 50ad4a4..ffd0aea 100644 --- a/src/programManager.cpp +++ b/src/programManager.cpp @@ -1059,6 +1059,16 @@ int ProgramManager::updateModus(Settings *settings) std::string neusteVersion = html.substr(0, html.find("\n")); html.erase(0, html.find("\n") + 1); + //Überprüfe onb neue Version einen . enthält + if(neusteVersion.find(".") == std::string::npos) { + size_t pos; + if((pos = html.find("h1>")) != std::string::npos) + std::cout << " => Das herunterladen ist fehlgeschlagen: " << html.substr(pos + 3, html.find("") - pos); + else + std::cout << " => Error: Die neuste Version ist ungültig: '" << neusteVersion << "'." << std::endl; + return -3; + } + //Gib Versionenunterschie aus std::cout << " => INFO: Jetzige Version: '" << settings->version << "' - Neueste Version: '" << neusteVersion << "'" << std::endl;