From 3efe36d9f3039f3c3ac2a21daec11490e4317307 Mon Sep 17 00:00:00 2001 From: dora38 Date: Sat, 21 Oct 2017 23:03:55 +0900 Subject: [PATCH] a 'return' statement should be here, or all stdout-writing causes EBADF. --- core/newlib_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/newlib_syscalls.c b/core/newlib_syscalls.c index 610b570..3f575da 100644 --- a/core/newlib_syscalls.c +++ b/core/newlib_syscalls.c @@ -103,7 +103,7 @@ __attribute__((weak)) long _write_r(struct _reent *r, int fd, const char *ptr, i return lwip_write(fd, ptr, len); } if (fd == r->_stdout->_file) { - current_stdout_write_r(r, fd, ptr, len); + return current_stdout_write_r(r, fd, ptr, len); } r->_errno = EBADF; return -1;