diff --git a/ExplorerPatcher/updates.c b/ExplorerPatcher/updates.c index d9731c8..50574dd 100644 --- a/ExplorerPatcher/updates.c +++ b/ExplorerPatcher/updates.c @@ -229,7 +229,7 @@ BOOL IsUpdateAvailableHelper( *szRealHash = 0; szRealHash++; DWORD dwRemoteLeftMost = atoi(szLeftMost); - if (pLeftMost) *pLeftMost = dwRemoteLeftMost; + if (pLeftMost) *pLeftMost = dwRemoteLeftMost - ((dwRemoteLeftMost == 22622 && szRealHash[0] != '!') ? 1 : 0); DWORD dwRemoteSecondLeft = atoi(szSecondLeft); if (pSecondLeft) *pSecondLeft = dwRemoteSecondLeft; DWORD dwRemoteSecondRight = atoi(szSecondRight); diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c index 0ebed8a..d0eaae5 100644 --- a/ExplorerPatcher/utility.c +++ b/ExplorerPatcher/utility.c @@ -431,11 +431,12 @@ int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash DWORD dwRightMost = 0; QueryVersionInfo(hModule, VS_VERSION_INFO, &dwLeftMost, &dwSecondLeft, &dwSecondRight, &dwRightMost); - sprintf_s(hash, 33, "%d.%d.%d.%d.", dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); + sprintf_s(hash, 33, "%d.%d.%d.%d.", dwLeftMost == 22621 ? 22622 : dwLeftMost, dwSecondLeft, dwSecondRight, dwRightMost); char real_hash[33]; ComputeFileHash(filename, real_hash, 33); strncpy_s(hash + strlen(hash), dwHash - strlen(hash), real_hash, 32 - strlen(hash)); + if (dwLeftMost == 22622) *(strchr(strchr(strchr(strchr(hash, '.') + 1, '.') + 1, '.') + 1, '.') + 1) = '!'; hash[33] = 0; return ERROR_SUCCESS;