Skip to content

Commit

Permalink
changed int to long to overcome overflow of number display
Browse files Browse the repository at this point in the history
- related bug reports: Issue #201, Issue #213
  • Loading branch information
stohn committed Aug 21, 2012
1 parent de04483 commit 31873ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Marlin/ultralcd.pde
Expand Up @@ -2621,7 +2621,7 @@ char *ftostr31(const float &x)

char *ftostr32(const float &x)
{
int xx=x*100;
long xx=x*100;
conv[0]=(xx>=0)?'+':'-';
xx=abs(xx);
conv[1]=(xx/100)%10+'0';
Expand Down Expand Up @@ -2666,7 +2666,7 @@ char *itostr4(const int &xx)
// convert float to string with +1234.5 format
char *ftostr51(const float &x)
{
int xx=x*10;
long xx=x*10;
conv[0]=(xx>=0)?'+':'-';
xx=abs(xx);
conv[1]=(xx/10000)%10+'0';
Expand All @@ -2682,7 +2682,7 @@ char *ftostr51(const float &x)
// convert float to string with +123.45 format
char *ftostr52(const float &x)
{
int xx=x*100;
long xx=x*100;
conv[0]=(xx>=0)?'+':'-';
xx=abs(xx);
conv[1]=(xx/10000)%10+'0';
Expand Down

0 comments on commit 31873ec

Please sign in to comment.