From c157d947bf2ec06ccdbeb52aa50f2cce8e7ea03b Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 3 May 2023 13:20:19 -0400 Subject: [PATCH] v2.1.0: improved handling of illegal chars in desktop error msgs --- .../shatteredpixeldungeon/desktop/DesktopLauncher.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java index a30446fb6..adaec14e0 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopLauncher.java @@ -86,8 +86,11 @@ public class DesktopLauncher { exceptionMsg = exceptionMsg.replace("com.shatteredpixel.shatteredpixeldungeon.", ""); exceptionMsg = exceptionMsg.replace("com.watabou.", ""); exceptionMsg = exceptionMsg.replace("com.badlogic.gdx.", ""); - exceptionMsg = exceptionMsg.replace("\t", " "); - exceptionMsg = exceptionMsg.replace("'", ""); + exceptionMsg = exceptionMsg.replace("\t", " "); //shortens length of tabs + + //replace ' and " with similar equivalents as tinyfd hates them for some reason + exceptionMsg = exceptionMsg.replace('\'', '’'); + exceptionMsg = exceptionMsg.replace('"', '”'); if (exceptionMsg.length() > 1000){ exceptionMsg = exceptionMsg.substring(0, 1000) + "...";