diff --git a/platform/Stream.cpp b/platform/Stream.cpp index 5c45c6c79f..bdc7af9177 100644 --- a/platform/Stream.cpp +++ b/platform/Stream.cpp @@ -147,7 +147,7 @@ int Stream::printf(const char *format, ...) lock(); std::va_list arg; va_start(arg, format); - fflush(_file); + std::fseek(_file, 0, SEEK_CUR); int r = vfprintf(_file, format, arg); va_end(arg); unlock(); @@ -169,7 +169,7 @@ int Stream::scanf(const char *format, ...) int Stream::vprintf(const char *format, std::va_list args) { lock(); - fflush(_file); + std::fseek(_file, 0, SEEK_CUR); int r = vfprintf(_file, format, args); unlock(); return r;