From 9ac7e30252fce5b9dafde3288519b020b73c37bd Mon Sep 17 00:00:00 2001 From: Embedded Micro Date: Tue, 10 Jun 2014 08:48:23 -0700 Subject: [PATCH] Update USBAPI.h Fixes bug where Serial.read() would always return 0 as the first byte. --- hardware/arduino/cores/arduino/USBAPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/arduino/cores/arduino/USBAPI.h b/hardware/arduino/cores/arduino/USBAPI.h index d506b585f..753bc6b20 100644 --- a/hardware/arduino/cores/arduino/USBAPI.h +++ b/hardware/arduino/cores/arduino/USBAPI.h @@ -28,7 +28,7 @@ extern USBDevice_ USBDevice; class Serial_ : public Stream { private: - int peek_buffer; + int peek_buffer = -1; public: void begin(unsigned long); void begin(unsigned long, uint8_t);