From 31873ec707d5ba19de59b046cb1e882b8bd4e1db Mon Sep 17 00:00:00 2001 From: stohn Date: Tue, 21 Aug 2012 16:47:39 +0200 Subject: [PATCH] changed int to long to overcome overflow of number display - related bug reports: Issue #201, Issue #213 --- Marlin/ultralcd.pde | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/ultralcd.pde b/Marlin/ultralcd.pde index 98d9f4bc8..5663dda80 100644 --- a/Marlin/ultralcd.pde +++ b/Marlin/ultralcd.pde @@ -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';