From 53e3e1a0c41374ebea6c58041a1243fb14427445 Mon Sep 17 00:00:00 2001 From: wcko87 Date: Wed, 26 Apr 2017 00:56:22 +0800 Subject: [PATCH] Fix index out of bounds exception with IsBossMusic when negative ids are used --- rabi_splitter_WPF/RabiEnums.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rabi_splitter_WPF/RabiEnums.cs b/rabi_splitter_WPF/RabiEnums.cs index 5ea939d..bd3a1f5 100644 --- a/rabi_splitter_WPF/RabiEnums.cs +++ b/rabi_splitter_WPF/RabiEnums.cs @@ -234,7 +234,7 @@ namespace rabi_splitter_WPF public static bool IsBossMusic(int musicId) { - return musicId < _isBossMusic.Length && _isBossMusic[musicId]; + return 0 <= musicId && musicId < _isBossMusic.Length && _isBossMusic[musicId]; } public static Tuple GetNextHammerLevel(int exp) {