We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acc4b38 commit e792ba2Copy full SHA for e792ba2
cores/arduino/WString.cpp
@@ -136,7 +136,7 @@ String::String(float value, unsigned char decimalPlaces)
136
int len = digitsBe4Decimal(value);
137
init();
138
139
- if(decimalPlaces) len = 1 + ((int)decimalPlaces & 0x0FF);
+ if(decimalPlaces) len += 1 + ((int)decimalPlaces & 0x0FF);
140
141
char buf[len+1];
142
*this = dtostrf(value, 0, decimalPlaces, buf);
@@ -147,7 +147,7 @@ String::String(double value, unsigned char decimalPlaces)
147
148
149
150
151
152
153
0 commit comments