SaveTool: fix a bug in the update checker.

This commit is contained in:
Guillaume Jacquemin 2022-03-21 16:47:29 +01:00
parent f4adb9e26a
commit cf72cbe2c6
1 changed files with 2 additions and 2 deletions

View File

@ -323,7 +323,7 @@ void SaveTool::updateCheckEvent(SDL_Event& event) {
start_point++;
}
auto components = Containers::StringView{str.data() + start_point, strlen(str.data() + start_point)}.split('.');
auto components = Containers::StringView{str.data() + start_point}.split('.');
major = std::strtol(components[0].data(), nullptr, 10);
minor = std::strtol(components[1].data(), nullptr, 10);
@ -352,7 +352,7 @@ void SaveTool::updateCheckEvent(SDL_Event& event) {
continue;
}
Version latest_ver{to_string(release["tag_name"])};
Version latest_ver{release["tag_name"].get<std::string>().c_str()};
if(latest_ver > current_ver || (latest_ver == current_ver && Utility::String::endsWith(SAVETOOL_VERSION, "-pre"))) {
_queue.addToast(Toast::Type::Warning, "Your version is out of date.\nCheck the settings for more information."_s,