Skip to content

Commit 03a7351

Browse files
committed
wip
1 parent 4bd63d5 commit 03a7351

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hems/shm/shm.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"net"
1010
"net/http"
1111
"os"
12+
"slices"
1213
"strconv"
1314
"strings"
1415
"time"
@@ -334,7 +335,7 @@ func (s *SEMP) deviceID(id int) string {
334335
// build stable device id of unique id plus charger ref
335336
lp := s.site.Loadpoints()[id]
336337

337-
did := s.did
338+
did := slices.Clone(s.did)
338339
for i, b := range sha256.Sum256([]byte(lp.GetChargerRef())) {
339340
did[i%len(did)] ^= b
340341
}

0 commit comments

Comments
 (0)