From 6412cb3aee925af43da678d94bab08e178bdb4cc Mon Sep 17 00:00:00 2001
From: EliteMasterEric <ericmyllyoja@gmail.com>
Date: Tue, 30 May 2023 16:21:12 -0400
Subject: [PATCH] Fix bug where story mode breaks after first playthrough

---
 source/funkin/ui/story/Level.hx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/funkin/ui/story/Level.hx b/source/funkin/ui/story/Level.hx
index 5d24de312..3ff0a5321 100644
--- a/source/funkin/ui/story/Level.hx
+++ b/source/funkin/ui/story/Level.hx
@@ -43,7 +43,8 @@ class Level implements IRegistryEntry<LevelData>
    */
   public function getSongs():Array<String>
   {
-    return _data.songs;
+    // Copy the array so that it can't be modified on accident
+    return _data.songs.copy();
   }
 
   /**