mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Stream.readBytesUntil() now writes null terminator within length.
This commit is contained in:
parent
ac3f093b76
commit
4b0a87b405
@ -214,7 +214,7 @@ int Stream::readBytesUntil( char terminator, char *buffer, size_t length)
|
||||
{
|
||||
int index = 0;
|
||||
*buffer = 0;
|
||||
while(index < length ){
|
||||
while(index < length-1 ){
|
||||
int c = timedRead();
|
||||
if( c <= 0 ){
|
||||
return 0; // timeout returns 0 !
|
||||
|
Loading…
x
Reference in New Issue
Block a user