2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-05 00:00:14 +00:00

Remove junk \0 from the end of search-string

This commit is contained in:
Simon Roberts 2021-10-12 08:49:29 +11:00
parent f7d997683f
commit 04ee0eb5f7
No known key found for this signature in database
GPG Key ID: 0F30F99E6B771FD4

View File

@ -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)