diff --git a/src/core/libraries/libkernel.cpp b/src/core/libraries/libkernel.cpp index c689964f..94b41a8e 100644 --- a/src/core/libraries/libkernel.cpp +++ b/src/core/libraries/libkernel.cpp @@ -3,6 +3,7 @@ // Generated By moduleGenerator #include +#include #include "common/logging/log.h" #include "error_codes.h" #include "libkernel.h" @@ -462,7 +463,11 @@ int PS4_SYSV_ABI _wait4() { */ s64 PS4_SYSV_ABI ps4__write(int d, const void* buf, std::size_t nbytes) { if (d <= 2) { // stdin,stdout,stderr - LOG_INFO(Kernel, "{}", (const char*)buf); + char* str = strdup((const char*)buf); + if (str[nbytes - 1] == '\n') + str[nbytes - 1] = 0; + LOG_INFO(Kernel, "{}", str); + free(str); return nbytes; } LOG_ERROR(Kernel, "(STUBBED) called d = {} nbytes = {} ", d, nbytes);