changed int to long to overcome overflow of number display

- related bug reports: Issue #201, Issue #213
This commit is contained in:
stohn 2012-08-21 16:47:39 +02:00
parent de0448343f
commit 31873ec707

View File

@ -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';
@ -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';
@ -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';