-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
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