From 0cfbfacc404a951eeb7aeeb298fc3a5e72bfebff Mon Sep 17 00:00:00 2001 From: Enrico Pozzobon Date: Sun, 17 Nov 2019 02:52:06 +0100 Subject: [PATCH] Fixed receiving the NUL '\x00' character on Serial --- cores/arduino/UARTClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/arduino/UARTClass.cpp b/cores/arduino/UARTClass.cpp index 8593189..82bfd4a 100644 --- a/cores/arduino/UARTClass.cpp +++ b/cores/arduino/UARTClass.cpp @@ -187,8 +187,8 @@ uarths_rec_callback(void *ctx) int data; auto &driver = *reinterpret_cast(ctx); data = uarths_getc(); - if(data != 0){ + if(data != EOF){ driver._buff->store_char((char)data); } return 0; -} \ No newline at end of file +}