mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-14 10:55:20 +01:00
fix possible array out of bounds
This commit is contained in:
parent
1f3ed39eb6
commit
6f20b874c5
@ -39,6 +39,6 @@ public class SoundMapping {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int getOldSound(int newSound) {
|
public static int getOldSound(int newSound) {
|
||||||
return newSound >= sounds.length ? -1 : sounds[newSound];
|
return newSound < 0 || newSound >= sounds.length ? -1 : sounds[newSound];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user