From 85bdcd1e1e2929f592a9c6542a5a709355b49f34 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sat, 13 Mar 2021 22:40:37 +1100 Subject: [PATCH] Fix script/benchstat-ratio.go when there's no '/' --- script/benchstat-ratio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/benchstat-ratio.go b/script/benchstat-ratio.go index 50bcd12d..0925b44f 100644 --- a/script/benchstat-ratio.go +++ b/script/benchstat-ratio.go @@ -192,7 +192,7 @@ func baselineKeyFor(key string) (bKey string) { } j := strings.IndexByte(key[i:], '/') if j < 0 { - return "" + j = len(key) - i } return key[:1] + *baseline + key[i:i+j] + gccSuffix }