From b3f4f812d818a860203d24dbf3f666a9557e0b7b Mon Sep 17 00:00:00 2001
From: zeripath <art27@cantab.net>
Date: Fri, 20 Mar 2020 18:21:28 +0000
Subject: [PATCH] account for empty lines in receive-hook message (#10773)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
---
 models/error.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/error.go b/models/error.go
index 675b7406b..09fb4ebca 100644
--- a/models/error.go
+++ b/models/error.go
@@ -1423,7 +1423,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 {