Skip to content

Possible divide by 0 error #2

Open
@ShawnHymel

Description

@ShawnHymel

Ratios in line 837 could possibly cause divide by 0 error if bounds check fails (line 785). Add a check beforehand to prevent this:

/* Catch to make sure we don't divide by 0 */
if( ((u_first + d_first) == 0) ||
    ((l_first + r_first) == 0) ||
    ((u_last + d_last) == 0) ||
    ((l_last + r_last) == 0) ) {

    return false;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions