Skip to content

Commit b1d8ff9

Browse files
reply_to_object function is broken for binary keys
There is currently no way to opt out of the way hgetall works with the node_redis library and if any of the keys have binary, they are incorrectly converted to the charactor 0xFEFF instead. This makes it impossible to fully use HGETALL.
1 parent 4672479 commit b1d8ff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function reply_to_object(reply) {
590590
}
591591

592592
for (j = 0, jl = reply.length; j < jl; j += 2) {
593-
key = reply[j].toString();
593+
key = reply[j].toString('binary');
594594
val = reply[j + 1];
595595
obj[key] = val;
596596
}

0 commit comments

Comments
 (0)