diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPPreferencesUpgrade.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m index fad33e7c..77af6b0a 100644 --- a/Source/SPPreferencesUpgrade.m +++ b/Source/SPPreferencesUpgrade.m @@ -375,11 +375,11 @@ void SPMigrateConnectionFavoritesData(void) NSInteger lastFavoriteIndex = [prefs integerForKey:@"LastFavoriteIndex"]; NSInteger defaultFavoriteIndex = [prefs integerForKey:SPDefaultFavorite]; - if ((lastFavoriteIndex >= (NSInteger)0) && ((NSUInteger)lastFavoriteIndex <= [favorites count])) { + if ((lastFavoriteIndex >= (NSInteger)0) && ((NSUInteger)lastFavoriteIndex < [favorites count])) { [prefs setInteger:[[[favorites objectAtIndex:lastFavoriteIndex] objectForKey:SPFavoriteIDKey] integerValue] forKey:SPLastFavoriteID]; } - if ((defaultFavoriteIndex >= (NSInteger)0) && ((NSUInteger)defaultFavoriteIndex <= [favorites count])) { + if ((defaultFavoriteIndex >= (NSInteger)0) && ((NSUInteger)defaultFavoriteIndex < [favorites count])) { [prefs setInteger:[[[favorites objectAtIndex:defaultFavoriteIndex] objectForKey:SPFavoriteIDKey] integerValue] forKey:SPDefaultFavorite]; } |