PostgreSQL: Fix listAllLoadableBlocks returning the same block

Suggested change from https://github.com/minetest/minetest/issues/9670#issuecomment-613563738
This commit is contained in:
SmallJoker 2020-04-14 20:30:02 +02:00
parent 5cf6318117
commit 7c43cf47c3

@ -301,7 +301,7 @@ void MapDatabasePostgreSQL::listAllLoadableBlocks(std::vector<v3s16> &dst)
int numrows = PQntuples(results); int numrows = PQntuples(results);
for (int row = 0; row < numrows; ++row) 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); PQclear(results);
} }