From 04ee0eb5f73aec4e4b0bdd7f2f2ee0023b46c240 Mon Sep 17 00:00:00 2001 From: Simon Roberts Date: Tue, 12 Oct 2021 08:49:29 +1100 Subject: [PATCH] Remove junk \0 from the end of search-string --- cointop/search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cointop/search.go b/cointop/search.go index fd455ff..dd06844 100644 --- a/cointop/search.go +++ b/cointop/search.go @@ -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)