FlxAnimationController: fix off-by-one and negative modulo bugs#3554
FlxAnimationController: fix off-by-one and negative modulo bugs#3554Geokureli merged 2 commits intoHaxeFlixel:devfrom
Conversation
|
For posterity, the off-by-one bug was introduced here: #2762 (D'oh!) Can you provide examples that would have failed in prior versions? We should add unit tests for them. I'm also not sure I understand how negative frame indices are used in set_frameIndex |
fix frame indexing and modulo behavior
2ecbd97 to
1cc1004
Compare
off-by-one in the loop negative modulo in
unit tests: added
|
|
Thanks! |
fixes bugs in FixAnimationController
(while (i-- >= 0) -> while (i-- > 0))
negative values are now clamped to 0 with a log warning,
values >= numFrames are wrapped with a log warning