diff --git a/lib/stringsutil/stringsutil.go b/lib/stringsutil/stringsutil.go index cd5754cfd..96afb208c 100644 --- a/lib/stringsutil/stringsutil.go +++ b/lib/stringsutil/stringsutil.go @@ -5,7 +5,7 @@ package stringsutil // If len(s) > maxLen, then s is replaced with "s_prefix..s_suffix", // so the total length of the returned string doesn't exceed maxLen. func LimitStringLen(s string, maxLen int) string { - if len(s) <= maxLen || maxLen <= 4 { + if len(s) <= maxLen || maxLen < 4 { return s } n := (maxLen / 2) - 1