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

padding should be done with space, not with '0'

This commit is contained in:
Martin Ayotte 2015-08-07 21:55:25 -04:00
parent aa6965c172
commit 659e467141

View File

@ -203,7 +203,7 @@ char * dtostrf(double number, signed char width, unsigned char prec, char *s) {
remainder -= digit;
}
// add '0' to fill minimum width requirement
while (width-- > 0) *out++ = '0';
while (width-- > 0) *out++ = ' ';
// make sure the string is terminated
*out = 0;
return s;