Remove junk \0 from the end of search-string

pull/216/head
Simon Roberts 3 years ago
parent f7d997683f
commit 04ee0eb5f7
No known key found for this signature in database
GPG Key ID: 0F30F99E6B771FD4

@ -66,7 +66,7 @@ func (ct *Cointop) DoSearch() error {
if n == 0 {
return nil
}
q := string(b)
q := strings.TrimSpace(string(b[:n]))
// remove slash
regex := regexp.MustCompile(`/(.*)`)
matches := regex.FindStringSubmatch(q)

Loading…
Cancel
Save