chore: fix deleting from slice

This commit is contained in:
andig 2025-06-23 11:28:01 +02:00
parent 01504b99e9
commit 4406b23999
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ func Delete(key string) error {
return err
}
settings = slices.Delete(settings, idx, idx)
settings = slices.Delete(settings, idx, idx+1)
}
return nil

View file

@ -199,7 +199,7 @@ func (c *EEBus) UnregisterDevice(ski string, device Device) {
defer c.mux.Unlock()
if idx := slices.Index(c.clients[ski], device); idx != -1 {
c.clients[ski] = slices.Delete(c.clients[ski], idx, idx)
c.clients[ski] = slices.Delete(c.clients[ski], idx, idx+1)
}
}