ensure that object versions are properly "masked" to 48-bit integers

This commit is contained in:
Wolfgang Sourdeau
2012-10-10 08:43:21 -04:00
parent ad2b5fe413
commit 060c036936
2 changed files with 4 additions and 2 deletions

View File

@@ -62,7 +62,8 @@ static Class MAPIStoreDBMessageK = Nil;
if ((uint32_t) res->ulPropTag == PidTagChangeNumber)
{
value = NSObjectFromMAPISPropValue (&res->lpProp);
cVersion = exchange_globcnt ([value unsignedLongLongValue] >> 16);
cVersion = exchange_globcnt (([value unsignedLongLongValue] >> 16)
& 0x0000ffffffffffffLL);
version = [NSNumber numberWithUnsignedLongLong: cVersion];
[self logWithFormat: @"change number from oxcfxics: %.16lx", [value unsignedLongLongValue]];
[self logWithFormat: @" version: %.16lx", cVersion];