|
@@ -2496,7 +2496,7 @@ public class Animation {
|
|
break;
|
|
break;
|
|
case pingpong: {
|
|
case pingpong: {
|
|
int n = (count << 1) - 2;
|
|
int n = (count << 1) - 2;
|
|
- index %= n;
|
|
|
|
|
|
+ index = n == 0 ? 0 : index % n;
|
|
if (index >= count) index = n - index;
|
|
if (index >= count) index = n - index;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -2508,7 +2508,7 @@ public class Animation {
|
|
break;
|
|
break;
|
|
case pingpongReverse:
|
|
case pingpongReverse:
|
|
int n = (count << 1) - 2;
|
|
int n = (count << 1) - 2;
|
|
- index = (index + count - 1) % n;
|
|
|
|
|
|
+ index = n == 0 ? 0 : (index + count - 1) % n;
|
|
if (index >= count) index = n - index;
|
|
if (index >= count) index = n - index;
|
|
}
|
|
}
|
|
}
|
|
}
|