mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
Fix bounds issue with empty log flushes
This commit is contained in:
@@ -130,7 +130,7 @@ public class AnsiLogging {
|
||||
return new PrintStream(new ByteArrayOutputStream() {
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
String s = new String(buf, 0, strip ? count - 1 : count);
|
||||
String s = new String(buf, 0, strip ? Math.max(0, count - 1) : count);
|
||||
if (!s.isBlank()) logger.accept(s);
|
||||
reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user