Crash in removeCellWithInfo #11

Open
quimarche opened this Issue Jun 23, 2011 · 0 comments

Comments

Projects
None yet
1 participant

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;
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment