diff --git a/library.properties b/library.properties index 77f9b6f..45c8b66 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Nokia 5110 LCD library -version=2.7.0 +version=2.7.1 author=Dimitris Platis maintainer=Dimitris Platis sentence=Arduino library for driving the Nokia 5110 LCD diff --git a/src/Nokia_LCD.cpp b/src/Nokia_LCD.cpp index 29404bb..d4f15b6 100644 --- a/src/Nokia_LCD.cpp +++ b/src/Nokia_LCD.cpp @@ -379,6 +379,10 @@ bool Nokia_LCD::print(double number, unsigned short decimals) { } } + if (fractional == 0) { + // If the fractional part is 0, then we have already printed it + return out_of_bounds; + } // prints the rest of the fractional return (out_of_bounds || print(fractional)); }