1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Merge branch 'esp8265' of https://github.com/esp8266/Arduino into esp8266

This commit is contained in:
Matt Jenkins 2015-05-15 22:21:12 +01:00
commit 480536d154

View File

@ -188,10 +188,10 @@ char * dtostrf(double number, signed char width, unsigned char prec, char *s) {
++out; ++out;
} }
while(prec-- > 0) { for (unsigned char decShift = prec; decShift > 0; decShift--) {
remainder *= 10.0; remainder *= 10.0;
} }
sprintf(out, "%d", (int) remainder); sprintf(out, "%0*d", prec, (int)remainder);
return s; return s;
} }