Skip to content

Commit 9b6cf4f

Browse files
committed
Correct size calculation for LPUSH, RPUSH, LREM
1 parent 104b0ee commit 9b6cf4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Redis.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ class Redis {
479479
redisReply *reply =
480480
static_cast<redisReply*>(redisCommandNULLSafe(prc_, "LREM %s %d %b",
481481
key.c_str(), count,
482-
x.begin(), x.size()*szdb));
482+
x.begin(), x.size()));
483483
SEXP rep = extract_reply(reply);
484484
freeReplyObject(reply);
485485
return(rep);
@@ -596,7 +596,7 @@ class Redis {
596596
redisReply *reply =
597597
static_cast<redisReply*>(redisCommandNULLSafe(prc_, "LPUSH %s %b",
598598
key.c_str(), x.begin(),
599-
x.size()*szdb));
599+
x.size()));
600600

601601

602602
SEXP rep = extract_reply(reply);
@@ -614,7 +614,7 @@ class Redis {
614614
redisReply *reply =
615615
static_cast<redisReply*>(redisCommandNULLSafe(prc_, "RPUSH %s %b",
616616
key.c_str(), x.begin(),
617-
x.size()*szdb));
617+
x.size()));
618618

619619
SEXP rep = extract_reply(reply);
620620
freeReplyObject(reply);

0 commit comments

Comments
 (0)