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
2014-09-18 10:23:51 +02:00
committed by Julio García
parent 445a1fb2d6
commit 415fb6034e

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