From bd59ecfb9293e5d19d0bc3b7654ba78aa544a59f Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 11 May 2010 14:30:56 +0200 Subject: [PATCH] fixed a problem leading to crashes, as keys can't be currently specially encoded, so we can't encode integers at object loading time... For now this can be fixed passing a few flags, or later can be fixed allowing encoded keys as well --- redis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis.c b/redis.c index 35020a912..1345322f5 100644 --- a/redis.c +++ b/redis.c @@ -3818,7 +3818,7 @@ static robj *rdbLoadIntegerObject(FILE *fp, int enctype) { val = 0; /* anti-warning */ redisPanic("Unknown RDB integer encoding type"); } - return createStringObjectFromLongLong(val); + return createObject(REDIS_STRING,sdsfromlonglong(val)); } static robj *rdbLoadLzfStringObject(FILE*fp) { -- GitLab