aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-09-15 11:56:44 +0200
committerGitHub <noreply@github.com>2024-09-15 11:56:44 +0200
commit3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe (patch)
treec36b84cccdc5eae3673cd96390919a8c5d9444d2 /src/main/java/at/hannibal2/skyhanni
parenta6ecdbcb42572739d4290bbaca463956c66b20cb (diff)
downloadskyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.tar.gz
skyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.tar.bz2
skyhanni-3e2cd8ee29ce571286d5cc2ccdc7ed74a9fffcbe.zip
Fix: Scoreboard Error during M7 Dragons (#2510)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
index 378fe03c6..a8cafcf3d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt
@@ -51,16 +51,13 @@ object ScoreboardData {
val lastColor = start.lastColorCode() ?: ""
// Generate the list of color suffixes
- val colorSuffixes = generateSequence(lastColor) { it.dropLast(2) }
- .takeWhile { it.isNotEmpty() }
- .toMutableList()
+ val colorSuffixes = lastColor.chunked(2).toMutableList()
// Iterate through the colorSuffixes to remove matching prefixes from 'end'
for (suffix in colorSuffixes.toList()) {
if (end.startsWith(suffix)) {
end = end.removePrefix(suffix)
colorSuffixes.remove(suffix)
- break
}
}