From aa330221177426822e6cab9f01a725ffab421ce8 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Mon, 9 Sep 2024 09:33:54 +0200 Subject: [PATCH] Update Stream.cpp Fixed hang: while (!Serial1.find(0xCA)) ; --- cores/esp32/Stream.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cores/esp32/Stream.cpp b/cores/esp32/Stream.cpp index 1eb8e512a32..ed94c52a135 100644 --- a/cores/esp32/Stream.cpp +++ b/cores/esp32/Stream.cpp @@ -122,10 +122,11 @@ int Stream::findMulti(struct Stream::MultiTarget *targets, int tCount) { } while (1) { - int c = timedRead(); - if (c < 0) { + int cc = timedRead(); + if (cc < 0) { return -1; } + char c = cc; for (struct MultiTarget *t = targets; t < targets + tCount; ++t) { // the simple case is if we match, deal with that first.