diff options
author | zeripath <art27@cantab.net> | 2020-03-20 18:21:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 20:21:28 +0200 |
commit | b3f4f812d818a860203d24dbf3f666a9557e0b7b (patch) | |
tree | e59155828fabb06082f7e4696a90a55ac64cae58 /models/error.go | |
parent | 2fa1078911af920172f5fca73d01d113262ed1bb (diff) | |
download | gitea-b3f4f812d818a860203d24dbf3f666a9557e0b7b.tar.gz gitea-b3f4f812d818a860203d24dbf3f666a9557e0b7b.zip |
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>
Diffstat (limited to 'models/error.go')
-rw-r--r-- | models/error.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/error.go b/models/error.go index 675b7406b8..09fb4ebcaf 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 { |