Skip to content

Commit

Permalink
edns0ede: fixed Error index
Browse files Browse the repository at this point in the history
  • Loading branch information
IrineSistiana committed Sep 24, 2023
1 parent b753642 commit 18842d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/edns0ede/ede_err.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ func (e *EdeErrors) Error() string {
sb := new(strings.Builder)
if len(*e) == 0 {
sb.WriteString("nil")
} else {
sb.WriteString((*e)[1].String())
return sb.String()
}

sb.WriteString((*e)[0].String())
for _, ede := range (*e)[1:] {
sb.WriteString(", ")
sb.WriteString(ede.String())
Expand Down

0 comments on commit 18842d0

Please sign in to comment.