From cdef33af7cb08f47882babe18ee812bccdf32765 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 29 Dec 2017 13:15:19 -0500 Subject: [PATCH] fix last commit --- contrib/backends/srndv2/src/srnd/util.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/backends/srndv2/src/srnd/util.go b/contrib/backends/srndv2/src/srnd/util.go index 9ba8180..b70e28f 100644 --- a/contrib/backends/srndv2/src/srnd/util.go +++ b/contrib/backends/srndv2/src/srnd/util.go @@ -279,7 +279,13 @@ func decAddr(encaddr, key string) string { } res := string(res_bytes) res = strings.TrimFunc(res, func(r rune) bool { - return r > 57 || r < 48 || r != '.' || r != '/' + if r <= 57 || r >= 48 { + return false + } + if r == '.' || r == '/' { + return false + } + return true }) if strings.Index(res, "/") == -1 { // TODO: ipv6