fix index out of range
This commit is contained in:
parent
dec61fa333
commit
0b315e97c8
@ -349,6 +349,9 @@ func (d *debugLog) getNormalizedStackTrace() string {
|
|||||||
for i, line := range lines {
|
for i, line := range lines {
|
||||||
if line[len(line)-1] == ')' {
|
if line[len(line)-1] == ')' {
|
||||||
idx := strings.LastIndex(line, "(")
|
idx := strings.LastIndex(line, "(")
|
||||||
|
if idx < 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
lines[i] = line[:idx]
|
lines[i] = line[:idx]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user