diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPPreferenceController.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 938accdc..c1a430f9 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -280,7 +280,7 @@ if (([favorite isKindOfClass:[NSDictionary class]]) && ([favorite objectForKey:@"name"]) && ([favorite objectForKey:@"query"])) continue; // By default make the query's name the first 32 characters of the query with '...' appended - int idx = ( [favorite length] > 32 ) ? 32 : [favorite length]; + int idx = ( [favorite length] > 32 ) ? 32 : [favorite length]-1; NSString *favoriteName = [[[favorite stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]] substringToIndex:idx] stringByAppendingString:@"..."]; [queryFavoritesArray replaceObjectAtIndex:i withObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:favoriteName, favorite, nil] forKeys:[NSArray arrayWithObjects:@"name", @"query", nil]]]; |