Don't show "new version available" button when the only difference is the -x64 suffix

Reported here:
http://steamcommunity.com/app/431730/discussions/2/1495615865231608633/
This commit is contained in:
David Capello 2017-09-26 17:28:57 -03:00
parent 188c2de4ca
commit 9ca6f24027

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2016 David Capello
// Copyright (C) 2001-2017 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
@ -17,6 +17,7 @@
#include "base/bind.h"
#include "base/convert_to.h"
#include "base/launcher.h"
#include "base/replace_string.h"
#include "base/version.h"
#include <ctime>
@ -205,7 +206,11 @@ void CheckUpdateThreadLauncher::showUI()
if (!m_preferences.updater.newVersion().empty()) {
base::Version serverVersion(m_preferences.updater.newVersion());
base::Version localVersion(VERSION);
std::string localVersionStr = VERSION;
base::replace_string(localVersionStr, "-x64", "");
base::Version localVersion(localVersionStr);
newVer = (localVersion < serverVersion);
}