aboutsummaryrefslogtreecommitdiff
path: root/src/database-redis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database-redis.cpp')
-rw-r--r--src/database-redis.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/database-redis.cpp b/src/database-redis.cpp
index b15f546b2..196d72f25 100644
--- a/src/database-redis.cpp
+++ b/src/database-redis.cpp
@@ -169,10 +169,12 @@ void Database_Redis::listAllLoadableBlocks(std::vector<v3s16> &dst)
}
switch (reply->type) {
case REDIS_REPLY_ARRAY:
+ dst.reserve(reply->elements);
for (size_t i = 0; i < reply->elements; i++) {
assert(reply->element[i]->type == REDIS_REPLY_STRING);
dst.push_back(getIntegerAsBlock(stoi64(reply->element[i]->str)));
}
+ break;
case REDIS_REPLY_ERROR:
throw FileNotGoodException(std::string(
"Failed to get keys from database: ") + reply->str);