Fix panic when len(result[1]) == 0
This commit is contained in:
parent
47d9285956
commit
2cbec0cf93
@ -79,7 +79,10 @@ func dataSplit(b []byte, enc byte) ([][]byte, error) {
|
||||
|
||||
result := bytes.SplitN(b, delim, 2)
|
||||
if len(result) != 2 {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
if len(result[1]) == 0 {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user