From b9d00142ddd284e31857a392ff33b4bbb8c32c7b Mon Sep 17 00:00:00 2001 From: cinience Date: Wed, 15 Apr 2015 10:34:57 +0800 Subject: [PATCH] Fix list model --- RedisStudio/Redis/RedisListModel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedisStudio/Redis/RedisListModel.cpp b/RedisStudio/Redis/RedisListModel.cpp index eb31f5c..195de8a 100644 --- a/RedisStudio/Redis/RedisListModel.cpp +++ b/RedisStudio/Redis/RedisListModel.cpp @@ -17,11 +17,12 @@ bool RedisListModel::GetData( const std::string& key, RedisResult& results ) if (lenreply->type == REDIS_REPLY_INTEGER) { long long llen = lenreply->integer; + results.NewColumn("Value"); for (int idx=0; idxCommand("LRANGE %s %d %d", key.c_str(), idx, idx+1000 > llen ? idx+1000 : llen - idx); if (!reply) return retVal; - results.NewColumn("Value"); + if (reply->type == REDIS_REPLY_ARRAY) { std::size_t i = 0;