Skip to content

Commit

Permalink
fix proto.Path
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Jun 30, 2017
1 parent 5aa1696 commit 652e589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proto/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func Path(payload []byte) []byte {
eol := bytes.IndexByte(payload[start:], '\r')
end := bytes.IndexByte(payload[start:], ' ')

if eol < end {
if eol > 0 && eol < end {
return payload[start : start + eol]
}

Expand Down

0 comments on commit 652e589

Please sign in to comment.