DTGridView
DTGridView copied to clipboard
Crash in removeCellWithInfo
Daniel
Please can you review & comment?
The two "greater than" tests for xPosition and yPosition should surely be "greater than or equal". If, for example info.yPosition = 3 and [gridCells count] = 3 then then next line [gridCells objectAtIndex:info.yPosition] evaluates to [gridCells objectAtIndex:3] and we get a range exception.
Regards
Chris & Murthy
-
(void)removeCellWithInfo:(DTGridViewCellInfo *)info {
if (info.yPosition > [gridCells count]) return; NSMutableArray *row = [gridCells objectAtIndex:info.yPosition]; if (info.xPosition > [row count]) return;