From c7e5dfa15f4a71b5a58a622376b156f60c16d363 Mon Sep 17 00:00:00 2001 From: dc37 Date: Thu, 9 Jun 2016 22:50:25 -0500 Subject: [PATCH] Fix bug with loading songs longer than 100 lines --- src/smp/SuperMarioPaint.java | 2 +- src/smp/components/general/Utilities.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/smp/SuperMarioPaint.java b/src/smp/SuperMarioPaint.java index d14e1a49..22e15f62 100644 --- a/src/smp/SuperMarioPaint.java +++ b/src/smp/SuperMarioPaint.java @@ -46,7 +46,7 @@ * * @author RehdBlob * @since 2012.08.16 - * @version 1.0.1 + * @version 1.0.2 */ public class SuperMarioPaint extends Application { diff --git a/src/smp/components/general/Utilities.java b/src/smp/components/general/Utilities.java index 48914826..9662d523 100644 --- a/src/smp/components/general/Utilities.java +++ b/src/smp/components/general/Utilities.java @@ -268,7 +268,11 @@ private static StaffSequence parseText(ArrayList read) { loaded.addLine(new StaffNoteLine()); } } - loaded.setLine(lineNum, st); + if (lineNum >= loaded.getTheLines().size()) { + loaded.addLine(st); + } else { + loaded.setLine(lineNum, st); + } } } return loaded;