aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-21 00:20:44 +0000
committerrowanbeentje <rowan@beent.je>2010-01-21 00:20:44 +0000
commit3eb2dc85b5bd6e2efcb65a900293627d0d977078 (patch)
tree816e0db38dea2e1a5baeb050e43b676ef4fbf8b1
parentd6097cbbb95c78fa16b7bd0305a494186c5dd583 (diff)
downloadsequelpro-3eb2dc85b5bd6e2efcb65a900293627d0d977078.tar.gz
sequelpro-3eb2dc85b5bd6e2efcb65a900293627d0d977078.tar.bz2
sequelpro-3eb2dc85b5bd6e2efcb65a900293627d0d977078.zip
- Fix an incorrect bounds check in the data storage class, fixing crashes when removing records in a range - seen in Issue #542.
-rw-r--r--Source/SPDataStorage.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPDataStorage.m b/Source/SPDataStorage.m
index 3db5cdbe..65153d2b 100644
--- a/Source/SPDataStorage.m
+++ b/Source/SPDataStorage.m
@@ -268,7 +268,7 @@ static inline void SPDataStorageEnsureCapacityForAdditionalRowCount(SPDataStorag
{
// Throw an exception if the range is out of bounds
- if (rangeToRemove.location + rangeToRemove.length >= numRows) [NSException raise:NSRangeException format:@"Requested storage index beyond bounds"];
+ if (rangeToRemove.location + rangeToRemove.length > numRows) [NSException raise:NSRangeException format:@"Requested storage index beyond bounds"];
// Free rows in the range
NSUInteger i, j = numColumns;