Skip to content

Commit

Permalink
Fix bug with loading songs longer than 100 lines
Browse files Browse the repository at this point in the history
  • Loading branch information
DC37 committed Jun 10, 2016
1 parent cec8437 commit c7e5dfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/smp/SuperMarioPaint.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*
* @author RehdBlob
* @since 2012.08.16
* @version 1.0.1
* @version 1.0.2
*/
public class SuperMarioPaint extends Application {

Expand Down
6 changes: 5 additions & 1 deletion src/smp/components/general/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ private static StaffSequence parseText(ArrayList<String> read) {
loaded.addLine(new StaffNoteLine());
}
}
loaded.setLine(lineNum, st);
if (lineNum >= loaded.getTheLines().size()) {
loaded.addLine(st);
} else {
loaded.setLine(lineNum, st);
}
}
}
return loaded;
Expand Down

0 comments on commit c7e5dfa

Please sign in to comment.