Skip to content

Commit

Permalink
Fixed float constant
Browse files Browse the repository at this point in the history
Fixed a float constant so double precision multiply is not linked in
  • Loading branch information
profdc9 authored Mar 17, 2019
1 parent ee0caa6 commit da2c9cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions STM32F1/cores/maple/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ float Stream::parseFloat(char skipChar){
boolean isFraction = false;
long value = 0;
int c;
float fraction = 1.0;
float fraction = 1.0f;

c = peekNextDigit();
// ignore non numeric leading characters
Expand All @@ -194,7 +194,7 @@ float Stream::parseFloat(char skipChar){
else if(c >= '0' && c <= '9') { // is c a digit?
value = value * 10 + c - '0';
if(isFraction)
fraction *= 0.1;
fraction *= 0.1f;
}
read(); // consume the character we got with peek
c = timedPeek();
Expand Down

0 comments on commit da2c9cb

Please sign in to comment.