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.
This commit is contained in:
victzh 2016-09-25 18:31:59 -04:00 committed by GitHub
parent 4021c32fdb
commit 3efde692e7
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ size_t Print::write(const void *buffer, uint32 size) {
uint8 *ch = (uint8*)buffer;
while (size--) {
write(*ch++);
n++;
}
return n;
}