Skip to content
This repository was archived by the owner on May 8, 2020. It is now read-only.
This repository was archived by the owner on May 8, 2020. It is now read-only.

Crash in removeCellWithInfo #11

@quimarche

Description

@quimarche

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;
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions