diff --git a/tasmota/support.ino b/tasmota/support.ino index 879a91fb0..0a5d26f10 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -167,6 +167,8 @@ float CharToFloat(const char *str) float right = 0; if (*pt == '.') { pt++; + // limit decimals to float max + pt[7]=0; right = atoi(pt); // Decimal part while (isdigit(*pt)) { pt++; @@ -1908,4 +1910,4 @@ String Decompress(const char * compressed, size_t uncompressed_size) { return content; } -#endif // USE_UNISHOX_COMPRESSION \ No newline at end of file +#endif // USE_UNISHOX_COMPRESSION