mojira.dev
MC-141036

Game crashes when shift-clicking a newly named item out of an anvil

The bug

When naming a previously unnamed item of any type, when I attempt to shift-click it out of the anvil, the game crashes. This happens more often when the item name is very long or contains non-letter characters, such as - or +.

How to reproduce

  1. Get an anvil and a diamond sword.

  2. Give yourself some xp.

    /xp add @s 500
  3. Put the diamond sword into the anvil, and rename the sword to:

    ABC123456789101112

    → ❌ Your game crashes.

Crash report

18w50a: [^crash-2018-12-13_15.14.11-client.txt]

Description: Rendering screen

java.lang.StringIndexOutOfBoundsException: String index out of range: -16
	at java.lang.String.substring(String.java:1919)
	at cqm.a(SourceFile:405)
	at cum.a(SourceFile:133)
	at dea.a(SourceFile:794)
	at cpk.d(SourceFile:910)
	at cpk.b(SourceFile:394)
	at net.minecraft.client.main.Main.main(SourceFile:154)

Linked issues

Attachments

Comments 2

Random Guyson

boq

Confirmed

Minecraft 18w50a, Minecraft 19w02a

Minecraft 19w03a

Retrieved