v2.1.0: improved handling of illegal chars in desktop error msgs

This commit is contained in:
Evan Debenham
2023-05-03 13:20:19 -04:00
parent e949746025
commit c157d947bf

View File

@@ -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) + "...";