From 3efde692e7751d0072c2307499dceb61627e8fed Mon Sep 17 00:00:00 2001 From: victzh Date: Sun, 25 Sep 2016 18:31:59 -0400 Subject: [PATCH] Fix return value for Print::write(const void *buffer, uint32 size) Print::write(const void *buffer, uint32 size) always returns 0, which is against specification. This patch fixes it. --- STM32F1/cores/maple/Print.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/STM32F1/cores/maple/Print.cpp b/STM32F1/cores/maple/Print.cpp index a973659..9c924d1 100644 --- a/STM32F1/cores/maple/Print.cpp +++ b/STM32F1/cores/maple/Print.cpp @@ -60,6 +60,7 @@ size_t Print::write(const void *buffer, uint32 size) { uint8 *ch = (uint8*)buffer; while (size--) { write(*ch++); + n++; } return n; }