Fix handling of strncpy on inverter delete
This commit is contained in:
parent
7ff0f111af
commit
9c4076d3d5
@ -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");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user