mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
c6795dde73
When System.(out|err).print was used before there was a visible EditorConsole, the message was written to the stderr/stdout by this instead of the EditorConsole. However, the write(data, offset, length) version would not pass on its offset and length parameters to the stdout/stderr stream, causing (parts of) a message to be printed multiple times. This commit makes sure the parameters are all properly passed to the real stream. For some reason the write(int) and write(byte[], int, int) methods in PrintStream do not throw an IOException like the write(byte[]) version, so the try block has to go.