From b1d8ff9ae8e57a5cac335baa9ac29dbcaecd5a88 Mon Sep 17 00:00:00 2001 From: Nick Apperson Date: Wed, 7 May 2014 14:14:11 -0500 Subject: [PATCH] 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. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0291f17be3..13964983e0 100644 --- a/index.js +++ b/index.js @@ -590,7 +590,7 @@ function reply_to_object(reply) { } for (j = 0, jl = reply.length; j < jl; j += 2) { - key = reply[j].toString(); + key = reply[j].toString('binary'); val = reply[j + 1]; obj[key] = val; }