Skip to content

Commit

Permalink
Fixed PEBKAC compatibility error where the game would crash if a chan…
Browse files Browse the repository at this point in the history
…nel that does not exist is used.
  • Loading branch information
SB15-MD committed Jan 29, 2024
1 parent 7256d27 commit ef4752e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BmsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ internal static Bms Load(MemoryStream stream, string bmsName)

var beat = int.Parse(key[..3], CultureInfo.InvariantCulture);
var typeCode = key.Substring(3, 2);

if (!Bms.Channels.ContainsKey(typeCode)) continue;

var type = Bms.Channels[typeCode];

if (type == Bms.ChannelType.SpTimesig)
Expand Down

0 comments on commit ef4752e

Please sign in to comment.