Mojira Archive
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

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)

Fixed

Random Guyson

[Mojang] Bartosz Bok

2018-12-13, 10:21 PM

2021-02-15, 06:25 AM

2019-01-16, 06:34 PM

8

5

Confirmed

Minecraft 18w50a, Minecraft 19w02a

Minecraft 19w03a