Skip to content

FloodFillFX Crash #16

@Nejuf

Description

@Nejuf

If the image's height is not divisible by the offset, this results in a crash because a script timeout. The reason being that subtracting the offset from a uint(dropY), can cause it to be negative, but since uint's can't be negative, the result is a very large number.

A simple restructuring in the draw() method fixes the problem.

Changing:


dropY -= offset;

dropRect.y -= offset;

if (dropY <= 0)
{
complete = true;
}

Into:


if (dropY <= offset)
{
    dropY = 0;
    complete = true;
}
else
{
    dropY -= offset;
    dropRect.y -= offset;
}

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