From 80fdadaa9375d443ec37982a438c4251912cda77 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 29 Jan 2013 23:06:52 +0000 Subject: - Fix a bounds check causing the preferences upgrade routine to fail in edge cases, addressing Issue #1547 - Bump the version number to 1.0.1 --- Resources/English.lproj/InfoPlist.strings | 2 +- Resources/Plists/Info.plist | 2 +- Source/SPPreferencesUpgrade.m | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/English.lproj/InfoPlist.strings b/Resources/English.lproj/InfoPlist.strings index a9d0ad4c..94c9ebec 100644 --- a/Resources/English.lproj/InfoPlist.strings +++ b/Resources/English.lproj/InfoPlist.strings @@ -1,4 +1,4 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "Sequel Pro version 1.0, Copyright 2002-2013 Sequel Pro and CocoaMySQL team."; +CFBundleGetInfoString = "Sequel Pro version 1.0.1, Copyright 2002-2013 Sequel Pro and CocoaMySQL team."; NSHumanReadableCopyright = "Copyright 2002-2013 Sequel Pro and CocoaMySQL team."; \ No newline at end of file diff --git a/Resources/Plists/Info.plist b/Resources/Plists/Info.plist index 6a544ecc..d629b0d4 100644 --- a/Resources/Plists/Info.plist +++ b/Resources/Plists/Info.plist @@ -162,7 +162,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleURLTypes 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]; } -- cgit v1.2.3