Skip to content

Commit

Permalink
Fix infinite loop on null
Browse files Browse the repository at this point in the history
Closes #5.
  • Loading branch information
tpope committed May 9, 2014
1 parent 9220e63 commit 871364d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/characterize.vim
Expand Up @@ -16,7 +16,7 @@ function! s:info(char)
while !empty(charseq)
let nr = charseq ==# "\n" ? 0 : char2nr(charseq)
let char = nr < 32 ? '^'.nr2char(64 + nr) : nr2char(nr)
let charseq = strpart(charseq, len(nr2char(nr)))
let charseq = strpart(charseq, nr ? len(nr2char(nr)) : 1)
let out = '<' . (empty(outs) ? '' : ' ') . char . '> ' . nr
if nr < 256
let out .= printf(', \%03o', nr)
Expand Down

0 comments on commit 871364d

Please sign in to comment.