Skip to content

Commit

Permalink
fix bug in txt encoding length
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Feb 18, 2016
1 parent d8d3514 commit 32ca5ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ rtxt.decode = function (buf, offset) {
rtxt.decode.bytes = 0

rtxt.encodingLength = function (data) {
if (!data) return 2
return (Buffer.isBuffer(data) ? data.length : Buffer.byteLength(data)) + 2
}

Expand Down

0 comments on commit 32ca5ff

Please sign in to comment.