fix overflow rendering uint32

This commit is contained in:
MichaelDvP
2022-11-01 17:38:33 +01:00
parent 4809ef3537
commit 756a136124

View File

@@ -337,9 +337,9 @@ char * Helpers::render_value(char * result, const uint32_t value, const int8_t f
if (!hasValue(value)) {
return nullptr;
}
result[0] = '\0';
int32_t new_value = fahrenheit ? format ? value * 1.8 + 32 * format * (fahrenheit - 1) : value * 1.8 + 32 * (fahrenheit - 1) : value;
char s[10] = {0};
result[0] = '\0';
uint32_t new_value = fahrenheit ? format ? value * 1.8 + 32 * format * (fahrenheit - 1) : value * 1.8 + 32 * (fahrenheit - 1) : value;
char s[10] = {0};
#ifndef EMSESP_STANDALONE
if (!format) {