diff --git a/models/error.go b/models/error.go index f1d240444..79322c5d7 100644 --- a/models/error.go +++ b/models/error.go @@ -1407,7 +1407,7 @@ func (err *ErrPushRejected) GenerateMessage() { } i += 8 nl := strings.IndexByte(err.StdErr[i:], '\n') - if nl > 0 { + if nl >= 0 { messageBuilder.WriteString(err.StdErr[i : i+nl+1]) i = i + nl + 1 } else {