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
Get an anvil and a diamond sword.
Give yourself some xp.
/xp add @s 500
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)
I can confirm