From 244fe2e969dfa41351a0acce720666ed23be001c Mon Sep 17 00:00:00 2001 From: yushijinhun Date: Sun, 23 Aug 2020 01:34:24 +0800 Subject: [PATCH] logging: remove control characters to prevent messing up the console --- src/main/java/moe/yushi/authlibinjector/util/Logging.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/moe/yushi/authlibinjector/util/Logging.java b/src/main/java/moe/yushi/authlibinjector/util/Logging.java index 086a3b1..3851a9f 100644 --- a/src/main/java/moe/yushi/authlibinjector/util/Logging.java +++ b/src/main/java/moe/yushi/authlibinjector/util/Logging.java @@ -47,6 +47,8 @@ public final class Logging { pw.close(); log += sw.toString(); } + // remove control characters to prevent messing up the console + log = log.replaceAll("[\\p{Cc}&&[^\r\n\t]]", ""); out.println(log); } }