diff --git a/internal/p9/beads.go b/internal/p9/beads.go index 2809a58..e5ea367 100644 --- a/internal/p9/beads.go +++ b/internal/p9/beads.go @@ -920,8 +920,7 @@ func containsBdRef(s string) bool { lower := strings.ToLower(s) idx := strings.Index(lower, "bd-") for idx != -1 { - rest := lower[idx+3:] - if len(rest) > 0 && isAlphanumeric(rest[0]) { + if idx+3 < len(lower) && isAlphanumeric(lower[idx+3]) { return true } next := strings.Index(lower[idx+1:], "bd-") diff --git a/internal/p9/server.go b/internal/p9/server.go index ca4c99e..2d343e2 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -600,7 +600,7 @@ func (s *Server) open(cs *connState, fc *plan9.Fcall) *plan9.Fcall { return &plan9.Fcall{Type: plan9.Ropen, Tag: fc.Tag, Qid: qid} } -func (s *Server) create(cs *connState, fc *plan9.Fcall) *plan9.Fcall { +func (s *Server) create(_ *connState, fc *plan9.Fcall) *plan9.Fcall { return errFcall(fc, "create not supported") }