mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +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()) {
|
||||
FrameNumber loopBegin, loopEnd;
|
||||
docSettings->getLoopRange(&loopBegin, &loopEnd);
|
||||
if (loopBegin < first) loopBegin = first;
|
||||
if (loopEnd > last) loopEnd = last;
|
||||
loopBegin = MID(first, loopBegin, last);
|
||||
loopEnd = MID(first, loopEnd, last);
|
||||
|
||||
first = loopBegin;
|
||||
last = loopEnd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user