Skip to content

Commit

Permalink
classlib: fix support of null string in System.out/err streams
Browse files Browse the repository at this point in the history
  • Loading branch information
konsoletyper committed Aug 17, 2024
1 parent 199032d commit 8dd3444
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
public class JSStdoutPrintStream extends JsConsolePrintStream {
@Override
public void print(String s) {
if (s == null) {
s = "null";
}
if (PlatformDetector.isWebAssemblyGC()) {
for (int i = 0; i < s.length(); ++i) {
WasmGCSupport.putCharStdout(s.charAt(i));
Expand Down

0 comments on commit 8dd3444

Please sign in to comment.