From ecc1dee87aa9f2adc1473306f0fe28f7a59ebb45 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 12 Jan 2022 14:16:43 -0500 Subject: [PATCH] fix(mail): support very large HIGHESTMODSEQ values --- SoObjects/Mailer/SOGoMailFolder.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index ae189839f..02093f3cd 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -2320,7 +2320,8 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSArray *uids) NSDictionary *d; id fetchResults, sortedResults; - int highestmodseq = 0, i; + int i; + uint64_t highestmodseq = 0; allTokens = [NSMutableArray array]; pool = [[NSAutoreleasePool alloc] init]; @@ -2328,7 +2329,7 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSArray *uids) if (![theSyncToken isEqualToString: @"-1"]) { a = [theSyncToken componentsSeparatedByString: @"-"]; - highestmodseq = [[a objectAtIndex: 1] intValue]; + highestmodseq = [[a objectAtIndex: 1] longLongValue]; } // We first make sure QRESYNC is enabled