Skip to content

Commit

Permalink
Handle not finding a tag in message
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiol committed Mar 18, 2016
1 parent ff71fe7 commit c4c4d6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rfc3164/rfc3164.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ func (p *Parser) parseTag() (string, error) {
from := p.cursor

for {
if p.cursor == p.l {
// no tag found, reset cursor for content
p.cursor = from
return "", nil
}

b = p.buff[p.cursor]
bracketOpen = (b == '[')
endOfTag = (b == ':' || b == ' ')
Expand Down

0 comments on commit c4c4d6d

Please sign in to comment.