Skip to content

Commit aa33022

Browse files
authored
Update Stream.cpp
Fixed hang: while (!Serial1.find(0xCA)) ;
1 parent e70f4d3 commit aa33022

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/esp32/Stream.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@ int Stream::findMulti(struct Stream::MultiTarget *targets, int tCount) {
122122
}
123123

124124
while (1) {
125-
int c = timedRead();
126-
if (c < 0) {
125+
int cc = timedRead();
126+
if (cc < 0) {
127127
return -1;
128128
}
129+
char c = cc;
129130

130131
for (struct MultiTarget *t = targets; t < targets + tCount; ++t) {
131132
// the simple case is if we match, deal with that first.

0 commit comments

Comments
 (0)