mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-09 18:44:46 +00:00
Fix issue 409: Infinite loop upon creating new sprite with a loop section set
Fix app::calculate_next_frame() to check that the loop section is correctly inside the available sprite frames range [0, nframes)
This commit is contained in:
parent
712d48245b
commit
b1843f8f7a
@ -39,8 +39,8 @@ raster::FrameNumber calculate_next_frame(
|
|||||||
if (docSettings->getLoopAnimation()) {
|
if (docSettings->getLoopAnimation()) {
|
||||||
FrameNumber loopBegin, loopEnd;
|
FrameNumber loopBegin, loopEnd;
|
||||||
docSettings->getLoopRange(&loopBegin, &loopEnd);
|
docSettings->getLoopRange(&loopBegin, &loopEnd);
|
||||||
if (loopBegin < first) loopBegin = first;
|
loopBegin = MID(first, loopBegin, last);
|
||||||
if (loopEnd > last) loopEnd = last;
|
loopEnd = MID(first, loopEnd, last);
|
||||||
|
|
||||||
first = loopBegin;
|
first = loopBegin;
|
||||||
last = loopEnd;
|
last = loopEnd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user