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.
This commit is contained in:
Enrique J. Hernández Blasco authored and Julio García committed 2014-11-19 17:12:29 +01:00
1 parent 445a1fb2d6
commit 415fb6034e
1 file changed
+1 -1
+1 -1
View File
@@ -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)];
}