From 85644e2eac626ff579fa8da1fabf7b2e0a1ff66d Mon Sep 17 00:00:00 2001 From: Frank Li Date: Tue, 16 Aug 2011 09:27:19 +0800 Subject: [PATCH] Fix potential problem at CheckFor update major and minor ... change to int32. major<<48 will be 0. Signed-off-by: Frank Li --- src/TortoiseProc/CheckForUpdatesDlg.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/TortoiseProc/CheckForUpdatesDlg.cpp b/src/TortoiseProc/CheckForUpdatesDlg.cpp index 55edc4ad4..dfe824ebf 100644 --- a/src/TortoiseProc/CheckForUpdatesDlg.cpp +++ b/src/TortoiseProc/CheckForUpdatesDlg.cpp @@ -149,7 +149,7 @@ UINT CCheckForUpdatesDlg::CheckThread() newversion <<= 16; newversion += x3; newversion <<=16; - newversion += build; + newversion += x4; if(newversion>version) { @@ -172,7 +172,13 @@ UINT CCheckForUpdatesDlg::CheckThread() micro = _ttoi(vertemp); vertemp = vertemp.Mid(vertemp.Find('.')+1); build = _ttoi(vertemp); - version = (major<<48) + (minor<<32) + (micro<<16)+build; + version = major; + version <<= 16; + version += minor; + version <<= 16; + version += micro; + version <<= 16; + version += build; } { -- 2.11.4.GIT