Skip to content

Commit

Permalink
One more fix for the MSP430 dtostrf() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertinant committed Nov 26, 2014
1 parent deefa24 commit 986411b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hardware/msp430/cores/msp430/avr/dtostrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
int32_t frac = mantissa * powf(10, prec);
if(frac < 0) frac = -frac;

sprintf(fmt, "%%%dd.%%%dd", width, prec);
sprintf(fmt, "%%0%dd.%%0%dd", width, prec);
sprintf(sout, fmt, whole, frac);
return sout;
}
Expand Down

0 comments on commit 986411b

Please sign in to comment.