Skip to content

Commit 4076903

Browse files
committedJul 8, 2014
Fix small bug in redis backend
1 parent dff4589 commit 4076903

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

Diff for: ‎db-redis.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ void DBRedis::loadPosCache()
134134
if(reply->type != REDIS_REPLY_ARRAY)
135135
throw std::runtime_error("Failed to get keys from database");
136136
for(size_t i = 0; i < reply->elements; i++) {
137-
if(!reply->element[i]->type == REDIS_REPLY_STRING)
137+
if(reply->element[i]->type != REDIS_REPLY_STRING)
138138
throw std::runtime_error("Got wrong response to 'HKEYS %s' command");
139139
posCache.push_back(decodeBlockPos(stoi64(reply->element[i]->str)));
140140
}
141-
141+
142142
freeReplyObject(reply);
143143
}
144144

@@ -164,4 +164,3 @@ void DBRedis::getBlocksOnZ(std::map<int16_t, BlockList> &blocks, int16_t zPos)
164164
freeReplyObject(reply);
165165
}
166166
}
167-

0 commit comments

Comments
 (0)
Please sign in to comment.