Compare commits

..

4 Commits

Author SHA1 Message Date
Auxilor
162558b1c2 Updated to 6.43.3 2022-10-03 13:44:28 +01:00
Auxilor
10f9e8dce0 Fixed Skull 2022-10-03 13:44:17 +01:00
Will FP
b02943d7ff Merge pull request #204
Fix: Skull texture out of bounds error
2022-10-03 13:42:39 +01:00
MillionthOdin16
1cf08955a0 Additional check for bounds error
explanation in comment
2022-10-02 19:33:37 -04:00
2 changed files with 22 additions and 2 deletions

View File

@@ -29,7 +29,27 @@ var SkullMeta.texture: String?
setProfile.isAccessible = true
}
if (base64 == null) {
/* This length check below was lost in the conversion. For some reason the base64
* string is length 8 when this is called pretty frequently, causing an
* out of bounds exception.
*
* Could not pass event EntityPotionEffectEvent to Talismans v5.116.0
* java.lang.StringIndexOutOfBoundsException: begin -12, end 8, length 8
* at java.lang.String.checkBoundsBeginEnd(String.java:4604) ~[?:?]
* at java.lang.String.substring(String.java:2707) ~[?:?]
* at java.lang.String.substring(String.java:2680) ~[?:?]
* at com.willfp.eco.internal.spigot.proxy.v1_19_R1.common.SkullKt.setTexture(Skull.kt:36)
*
if (base64.length < 20) {
return
}
*
* ^ Update to this comment: a length 8 string ("textures") was being sent
* because the get() method wasn't working right. This has been fixed, but the
* check needs to remain implemented.
*/
if (base64 == null || base64.length < 20) {
setProfile.invoke(this, null)
} else {
val uuid = UUID(

View File

@@ -1,3 +1,3 @@
version = 6.43.2
version = 6.43.3
plugin-name = eco
kotlin.code.style = official