Fix handling of strncpy on inverter delete

This commit is contained in:
Thomas Basler 2022-10-05 18:27:35 +02:00
parent 7ff0f111af
commit 9c4076d3d5

View File

@ -319,7 +319,7 @@ void WebApiInverterClass::onInverterDelete(AsyncWebServerRequest* request)
Hoymiles.removeInverterBySerial(inverter.Serial); Hoymiles.removeInverterBySerial(inverter.Serial);
inverter.Serial = 0; inverter.Serial = 0;
strncpy(inverter.Name, "", 0); strncpy(inverter.Name, "", sizeof(inverter.Name));
Configuration.write(); Configuration.write();
retMsg[F("type")] = F("success"); retMsg[F("type")] = F("success");