Audit changes.
This commit is contained in:
@@ -55,9 +55,9 @@ func updateHosts(hostsPath, localDomain string, peers map[netip.Addr]*Peer) erro
|
||||
after := ""
|
||||
|
||||
if idxBegin := strings.Index(data, begin); idxBegin != -1 {
|
||||
idxEnd := strings.Index(data, end)
|
||||
idxEnd := strings.Index(data[idxBegin:], end)
|
||||
if idxEnd != -1 {
|
||||
after = strings.TrimSpace(data[idxEnd+len(end):])
|
||||
after = strings.TrimSpace(data[idxBegin+idxEnd+len(end):])
|
||||
}
|
||||
before = strings.TrimSpace(data[:idxBegin])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user