mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
Fixed NBTTagString.toString not properly escaping \'s. Closes #2393
This commit is contained in:
1 parent
93be22fc8e
commit
772e7da3a3
1 file changed
+10
@@ -9,3 +9,13 @@
|
||||
}
|
||||
|
||||
public byte func_74732_a()
|
||||
@@ -42,7 +42,8 @@
|
||||
|
||||
public String toString()
|
||||
{
|
||||
- return "\"" + this.field_74751_a.replace("\"", "\\\"") + "\"";
|
||||
+ // Forge: BugFix: Vanilla does a normal " -> \" conversion but doesn't escape \
|
||||
+ return "\"" + org.apache.commons.lang3.StringUtils.replaceEach(this.field_74751_a, new String[]{"\\","\""}, new String[]{"\\\\","\\\""}) + "\"";
|
||||
}
|
||||
|
||||
public NBTBase func_74737_b()
|
||||
Reference in new issue
Block a user