Skip to content

Commit

Permalink
Compensate for snprintf including NULL in width parameter and dtostrf…
Browse files Browse the repository at this point in the history
… not including NULL in width parameter
  • Loading branch information
majenkotech committed Jul 1, 2018
1 parent 9e6a21b commit 7f91418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pic32/cores/pic32/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/*********************************************/

char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s) {
snprintf(__s, __width, "%.*f", __prec, __val);
snprintf(__s, __width + 1, "%.*f", __prec, __val);
return __s;
}

Expand Down

0 comments on commit 7f91418

Please sign in to comment.