Closed
Description
Using go1.17.5
len(b) >= 3 && b[len(b)-3] == '#'
Part of the assembly includes:
0x002f 00047 (main.go:6) CALL runtime.panicIndex(SB)
This should be unnecessary since the previous len(b) >= 3
check ensures that the buffer must contain the len(b)-3
element. Thus, there is no possibility of the index panicking.
\cc @martisch @randall77