Leniency when trimming incoming sound ids (#3852)

This commit is contained in:
Konicai 2023-06-09 21:30:03 -04:00 committed by GitHub
parent 1d99f8beb8
commit 049d64d34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,8 +79,9 @@ public final class SoundUtils {
private static String trim(String identifier) {
// Drop any namespace if applicable
if (identifier.contains(":")) {
return identifier.split(":")[1];
int i = identifier.indexOf(':');
if (i >= 0) {
return identifier.substring(i + 1);
}
return identifier;
}