diff --git a/cores/esp8266/Stream.cpp b/cores/esp8266/Stream.cpp index 5e7e8636c1..f6aa7487c7 100644 --- a/cores/esp8266/Stream.cpp +++ b/cores/esp8266/Stream.cpp @@ -274,7 +274,7 @@ int Stream::read (uint8_t* buffer, size_t maxLen) int c = read(); if (c == -1) break; - buffer[nbread++] = read(); + buffer[nbread++] = c; } return nbread; }