From 407690398029a32653912d9dfcae171a22042408 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 8 Jul 2014 13:54:41 +0200 Subject: [PATCH] Fix small bug in redis backend --- db-redis.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db-redis.cpp b/db-redis.cpp index 11a287a..c09521d 100644 --- a/db-redis.cpp +++ b/db-redis.cpp @@ -134,11 +134,11 @@ void DBRedis::loadPosCache() if(reply->type != REDIS_REPLY_ARRAY) throw std::runtime_error("Failed to get keys from database"); for(size_t i = 0; i < reply->elements; i++) { - if(!reply->element[i]->type == REDIS_REPLY_STRING) + if(reply->element[i]->type != REDIS_REPLY_STRING) throw std::runtime_error("Got wrong response to 'HKEYS %s' command"); posCache.push_back(decodeBlockPos(stoi64(reply->element[i]->str))); } - + freeReplyObject(reply); } @@ -164,4 +164,3 @@ void DBRedis::getBlocksOnZ(std::map &blocks, int16_t zPos) freeReplyObject(reply); } } -