From 3eb2dc85b5bd6e2efcb65a900293627d0d977078 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 21 Jan 2010 00:20:44 +0000 Subject: - Fix an incorrect bounds check in the data storage class, fixing crashes when removing records in a range - seen in Issue #542. --- Source/SPDataStorage.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3