1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 17:15:21 +02:00

Fix /emergeblocks crashing in debug builds (#11461)

The reason for the bug was an u16 overflow, thus failing the assert. This only happened in Debug build but not in Release builds.
This commit is contained in:
Wuzzy
2021-07-31 17:54:40 +00:00
committed by GitHub
parent 0257e7150f
commit e7cd4cfa25
5 changed files with 29 additions and 24 deletions

View File

@@ -194,11 +194,11 @@ private:
std::mutex m_queue_mutex;
std::map<v3s16, BlockEmergeData> m_blocks_enqueued;
std::unordered_map<u16, u16> m_peer_queue_count;
std::unordered_map<u16, u32> m_peer_queue_count;
u16 m_qlimit_total;
u16 m_qlimit_diskonly;
u16 m_qlimit_generate;
u32 m_qlimit_total;
u32 m_qlimit_diskonly;
u32 m_qlimit_generate;
// Managers of various map generation-related components
// Note that each Mapgen gets a copy(!) of these to work with