From 4f17c93a83241e967d26a4501d9e0a935878dd09 Mon Sep 17 00:00:00 2001 From: pablozg Date: Fri, 20 Sep 2019 22:46:34 +0200 Subject: [PATCH] Fix max value in EnergyReset command --- sonoff/xdrv_03_energy.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonoff/xdrv_03_energy.ino b/sonoff/xdrv_03_energy.ino index a76ce2069..23441b6c4 100644 --- a/sonoff/xdrv_03_energy.ino +++ b/sonoff/xdrv_03_energy.ino @@ -523,7 +523,7 @@ void CmndEnergyReset(void) uint32_t values[2]; while ((str != nullptr) && (position <= 1)) { - uint8_t value = strtol(str, nullptr, 10); + uint32_t value = strtoul(str, nullptr, 10); values[position] = value; str = strtok_r(nullptr, ", ", &p); position += 1;