1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

Print not aborting on write failure

See #3614
This commit is contained in:
Cristian Maglie 2015-10-26 12:00:47 +01:00
parent 9552cc6ce2
commit b01eda179a
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@ ARDUINO 1.6.6
[core]
* AVR: fixed wrong turnOffPWM() for TIMER0B. Thanks @gonzoveliki
* ArduinoISP is now compatible with every architecture (not only AVR) and is much more stable. Thanks @PeterVH
* Print not aborting on write() failure. Thanks @stickbreaker
ARDUINO 1.6.5-r5 - 2015.08.28

View File

@ -17,6 +17,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Modified 23 November 2006 by David A. Mellis
Modified 03 August 2015 by Chuck Todd
*/
#include <stdlib.h>
@ -34,7 +35,8 @@ size_t Print::write(const uint8_t *buffer, size_t size)
{
size_t n = 0;
while (size--) {
n += write(*buffer++);
if (write(*buffer++)) n++;
else break;
}
return n;
}