Skip to content

Commit b06976d

Browse files
committed
[win] fix auto update
1 parent 2eaf5cb commit b06976d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/OpenKey/win32/OpenKey/OpenKey/OpenKeyManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ bool OpenKeyManager::checkUpdate(string& newVersion) {
6868
string versionCodeString = data.substr(0, data.find("}"));
6969
DWORD versionCode = (DWORD)atoi(versionCodeString.c_str());
7070
DWORD currentVersion = OpenKeyHelper::getVersionNumber();
71-
versionCode = (versionCode << 24) | (versionCode & 0x00FF00) | (versionCode >> 24 & 0xFF);
72-
currentVersion = (currentVersion << 24) | (currentVersion & 0x00FF00) | (currentVersion >> 24 & 0xFF);
71+
versionCode = (versionCode << 16) | (versionCode & 0x00FF00) | (versionCode >> 16 & 0xFF);
72+
currentVersion = (currentVersion << 16) | (currentVersion & 0x00FF00) | (currentVersion >> 16 & 0xFF);
7373
if (versionCode > currentVersion) {
7474
return true;
7575
}

0 commit comments

Comments
 (0)