Skip to content

Commit

Permalink
Bugfix: Stream::parseFloat() not handling timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Jun 28, 2024
1 parent cbb1781 commit 65c533b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sming/Wiring/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,9 @@ float Stream::parseFloat(char skipChar)
bool isNegative = false;
bool isFraction = false;
long value = 0;
char c;
float fraction = 1.0;

c = peekNextDigit();
int c = peekNextDigit();
// ignore non numeric leading characters
if(c < 0) {
return 0; // timeout
Expand Down

0 comments on commit 65c533b

Please sign in to comment.