Fix script/benchstat-ratio.go when there's no '/'

This commit is contained in:
Nigel Tao committed 2021-03-13 22:40:37 +11:00
1 parent 3e5afc3e52
commit 85bdcd1e1e
1 file changed
+1 -1
+1 -1
View File
@@ -192,7 +192,7 @@ func baselineKeyFor(key string) (bKey string) {
} }
j := strings.IndexByte(key[i:], '/') j := strings.IndexByte(key[i:], '/')
if j < 0 { if j < 0 {
return "" j = len(key) - i
} }
return key[:1] + *baseline + key[i:i+j] + gccSuffix return key[:1] + *baseline + key[i:i+j] + gccSuffix
} }