Skip to content

Commit

Permalink
[#159] fix slice bounds out of range error in abbrev template fun…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
coryb committed Apr 1, 2018
1 parent 79c83f6 commit 359bec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jiracli/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func TemplateProcessor() *template.Template {
return strings.Join(vals, sep)
},
"abbrev": func(max int, content string) string {
if len(content) > max {
if len(content) > max && max > 2 {
var buffer bytes.Buffer
buffer.WriteString(content[:max-3])
buffer.WriteString("...")
Expand Down

0 comments on commit 359bec2

Please sign in to comment.