aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-09-13 00:23:14 +1000
committerGitHub <noreply@github.com>2022-09-12 16:23:14 +0200
commit1fec0d019215df8c57d410c18bd06445d8c2ded7 (patch)
tree867e87bed7e60c22e3269c291827ceb43d39dde8 /src/main/java
parent765b569dd667d6a7e86b26d5ef1e7c5a5bade8f7 (diff)
downloadNotEnoughUpdates-1fec0d019215df8c57d410c18bd06445d8c2ded7.tar.gz
NotEnoughUpdates-1fec0d019215df8c57d410c18bd06445d8c2ded7.tar.bz2
NotEnoughUpdates-1fec0d019215df8c57d410c18bd06445d8c2ded7.zip
Fix crash related to profile viewer button (#272)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
index 7c3414fa..be36d0b4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
@@ -96,7 +96,7 @@ public abstract class MixinGuiContainer extends GuiScreen {
if (tag.hasKey("SkullOwner") && tag.getCompoundTag("SkullOwner").hasKey("Name")) {
String tagName = tag.getCompoundTag("SkullOwner").getString("Name");
String displayName = Utils.cleanColour(cc.inventorySlots.get(22).getStack().getDisplayName());
- if (tagName.equals(displayName.substring(displayName.length() - tagName.length()))) {
+ if (displayName.length() - tagName.length() > 0 && tagName.equals(displayName.substring(displayName.length() - tagName.length()))) {
ci.cancel();
this.zLevel = 100.0F;