diff --git a/lib/registry.js b/lib/registry.js index cf10632..a400cd9 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -76,7 +76,7 @@ var api = { if (value.type === types.LPTSR) { // TODO not sure why buffer's utf8 parsing leaves in the unicode null // escape sequence. This is a work-around (at least on node 4.1) - value = value.toString().replace('\u0000', ''); + value = value.toString('binary').replace('\u0000', ''); } return value;