From 3a30087929faba70ee1160a74ff8d80901107250 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 21:21:33 +0200 Subject: [PATCH] Fix selecting "IAHN - Transform [Aspire]" map crashing the game (#5) --- .../opsu/objects/curves/EqualDistanceMultiCurve.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/itdelatrisu/opsu/objects/curves/EqualDistanceMultiCurve.java b/src/itdelatrisu/opsu/objects/curves/EqualDistanceMultiCurve.java index 4393d1aa..67c2ca46 100644 --- a/src/itdelatrisu/opsu/objects/curves/EqualDistanceMultiCurve.java +++ b/src/itdelatrisu/opsu/objects/curves/EqualDistanceMultiCurve.java @@ -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; // TODO this prevents aspire map from crashing the game, but does it breaks stuff? + } + Vec2f c2 = curve[cnt++]; while (cnt <= ncurve && c2.cpy().sub(c1).len() < 1) c2 = curve[cnt++];