mirror of https://github.com/arendst/Tasmota.git
fix chartofloat digit overflow
This commit is contained in:
parent
3c4fb6c56a
commit
7d1a275606
|
@ -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
|
||||
#endif // USE_UNISHOX_COMPRESSION
|
||||
|
|
Loading…
Reference in New Issue