do trim on encodingLength as well
This commit is contained in:
parent
c11116822a
commit
25f15dd0fe
2
index.js
2
index.js
@ -78,7 +78,7 @@ name.decode.bytes = 0
|
|||||||
|
|
||||||
name.encodingLength = function (n) {
|
name.encodingLength = function (n) {
|
||||||
if (n === '.') return 1
|
if (n === '.') return 1
|
||||||
return Buffer.byteLength(n) + 2
|
return Buffer.byteLength(n.replace(/^\.|\.$/gm, '')) + 2
|
||||||
}
|
}
|
||||||
|
|
||||||
const string = {}
|
const string = {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user