From 6ee67312909d2ccfa47496d50bf46e0665902b2d Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 21 Mar 2020 02:49:02 +0000 Subject: [PATCH] account for empty lines in receive-hook message (#10773) (#10784) Co-authored-by: Lunny Xiao Co-authored-by: John Olheiser Co-authored-by: Lauris BH --- models/error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {