diff --git a/subsystememu/csrc/dpic.cc b/subsystememu/csrc/dpic.cc index 593358281..b8b410905 100644 --- a/subsystememu/csrc/dpic.cc +++ b/subsystememu/csrc/dpic.cc @@ -184,11 +184,13 @@ extern "C" void AXI4MMIODPI( while (uart.exist_tx()) { char c = uart.getc(); - printf("%c",c); - fflush(stdout); if (c == -1) { exit(0); } + else { + printf("%c",c); + fflush(stdout); + } } // CTRL END }