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)]; }