From 7c43cf47c37b0204e34d12670d2e6975eb36b45a Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 14 Apr 2020 20:30:02 +0200 Subject: [PATCH] PostgreSQL: Fix listAllLoadableBlocks returning the same block Suggested change from https://github.com/minetest/minetest/issues/9670#issuecomment-613563738 --- src/database/database-postgresql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/database-postgresql.cpp b/src/database/database-postgresql.cpp index 77385e240..92816205c 100644 --- a/src/database/database-postgresql.cpp +++ b/src/database/database-postgresql.cpp @@ -301,7 +301,7 @@ void MapDatabasePostgreSQL::listAllLoadableBlocks(std::vector &dst) int numrows = PQntuples(results); for (int row = 0; row < numrows; ++row) - dst.push_back(pg_to_v3s16(results, 0, 0)); + dst.push_back(pg_to_v3s16(results, row, 0)); PQclear(results); } -- 2.25.1