Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloodFillFX Crash #16

Open
FlixelCommunityBot opened this issue Nov 28, 2013 · 0 comments
Open

FloodFillFX Crash #16

FlixelCommunityBot opened this issue Nov 28, 2013 · 0 comments

Comments

@FlixelCommunityBot
Copy link

Issue by Nejuf from Friday Sep 07, 2012 at 03:27 GMT
Originally opened as photonstorm#16


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

No branches or pull requests

1 participant