Skip to content

Commit 0778113

Browse files
committed
Prevent Console Spam
1 parent ff793b5 commit 0778113

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/the/bytecode/club/bytecodeviewer/gui/components/JFrameConsole.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ public String trimConsoleText(final String s)
143143
//trim
144144
int skipped = len - max;
145145
String trimmed = s.substring(0, max);
146-
trimmed = ("WARNING: Skipping " + skipped + " chars, allowing " + max + "\n\r")
146+
147+
if(!trimmed.startsWith("WARNING: Skipping"))
148+
trimmed = ("WARNING: Skipping " + skipped + " chars, allowing " + max + "\n\r")
147149
+ "Full log saved to: " + tempFile.getAbsolutePath() + "\n\r\n\r"
148150
+ trimmed;
149151

0 commit comments

Comments
 (0)