mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Stream.readBytesUntil() now writes null terminator within length.
This commit is contained in:
@ -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 !
|
||||
|
Reference in New Issue
Block a user