From 415fb6034e76dc666970070b9ac437bf4e1e9834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20J=2E=20Hern=C3=A1ndez=20Blasco?= Date: Thu, 18 Sep 2014 10:23:51 +0200 Subject: [PATCH] oc-calendar: Retrieve properly event description created on SOGo As it is stored as plain text without triming string. The correct comparison here is NSNotFound as stated in Apple documentation. --- OpenChange/MAPIStoreAppointmentWrapper.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenChange/MAPIStoreAppointmentWrapper.m b/OpenChange/MAPIStoreAppointmentWrapper.m index 24c6e1ad3..c256081b7 100644 --- a/OpenChange/MAPIStoreAppointmentWrapper.m +++ b/OpenChange/MAPIStoreAppointmentWrapper.m @@ -1231,7 +1231,7 @@ static NSCharacterSet *hexCharacterSet = nil; /* Avoiding those trail weird characters at event description */ range = [stringValue rangeOfString: trimingString options: NSBackwardsSearch]; - if (range.location > 0) + if (range.location != NSNotFound) { stringValue = [stringValue substringToIndex: (NSMaxRange(range) -1)]; }