fix bug in txt encoding length

This commit is contained in:
Mathias Buus 2016-02-18 13:20:47 -08:00
parent d8d3514ea8
commit 32ca5ff640

View File

@ -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
}