From 4fdbade7a4300c5af62e4f7d01657987f08f2f9b Mon Sep 17 00:00:00 2001 From: Lars Wilhelmsen Date: Thu, 18 Jun 2020 15:43:18 +0200 Subject: [PATCH] Fix crash in fenceMatchRoam causing an index out of range panic --- internal/server/fence.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/fence.go b/internal/server/fence.go index d7ea489e..fdb1dbeb 100644 --- a/internal/server/fence.go +++ b/internal/server/fence.go @@ -410,7 +410,7 @@ func fenceMatchRoam( var match bool var j int for ; j < len(newNearbys); j++ { - if newNearbys[i].id == oldNearbys[i].id { + if newNearbys[j].id == oldNearbys[i].id { match = true break }