check array size before accessing next element (fixes aspire map crash)
This commit is contained in:
parent
fd8474365d
commit
5f9f68c6e8
|
@ -109,6 +109,11 @@ public abstract class EqualDistanceMultiCurve extends Curve {
|
|||
// if (hitObject.getRepeatCount() > 1) {
|
||||
Vec2f c1 = curve[0];
|
||||
int cnt = 1;
|
||||
|
||||
if (cnt > ncurve) {
|
||||
return;
|
||||
}
|
||||
|
||||
Vec2f c2 = curve[cnt++];
|
||||
while (cnt <= ncurve && c2.cpy().sub(c1).len() < 1)
|
||||
c2 = curve[cnt++];
|
||||
|
|
Loading…
Reference in New Issue
Block a user