forked from photonstorm/Flixel-Power-Tools
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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;
}
Metadata
Metadata
Assignees
Labels
No labels