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