File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
hardware/arduino/avr/cores/arduino Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -265,11 +265,11 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
265265
266266 for (struct MultiTarget *t = targets; t < targets+tCount; ++t) {
267267 // the simple case is if we match, deal with that first.
268- if (c == t->str [t->index ])
269- if (++t->index == t->len )
270- return t - targets;
271- else
272- continue ;
268+ if (c == t->str [t->index ]) {
269+ if (++t->index == t->len )
270+ return t - targets;
271+ } else
272+ continue ;
273273
274274 // if not we need to walk back and see if we could have matched further
275275 // down the stream (ie '1112' doesn't match the first position in '11112'
@@ -293,7 +293,7 @@ int Stream::findMulti( struct Stream::MultiTarget *targets, int tCount) {
293293
294294 // otherwise we need to check the rest of the found string
295295 int diff = origIndex - t->index ;
296- int i;
296+ size_t i;
297297 for (i = 0 ; i < t->index ; ++i)
298298 if (t->str [i] != t->str [i + diff])
299299 break ;
You can’t perform that action at this time.
0 commit comments