aboutsummaryrefslogtreecommitdiff
path: root/src/emerge.h
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-07-31 17:54:40 +0000
committerGitHub <noreply@github.com>2021-07-31 19:54:40 +0200
commite7cd4cfa25485610c05a906859e8365158a13f69 (patch)
treea7160e8a470fc3fe59e1b944cf0f5e9135d5d4e3 /src/emerge.h
parent0257e7150f4c6dfe7b10802ada938143253c1773 (diff)
downloadminetest-e7cd4cfa25485610c05a906859e8365158a13f69.tar.gz
minetest-e7cd4cfa25485610c05a906859e8365158a13f69.tar.bz2
minetest-e7cd4cfa25485610c05a906859e8365158a13f69.zip
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.
Diffstat (limited to 'src/emerge.h')
-rw-r--r--src/emerge.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emerge.h b/src/emerge.h
index b060226f8..e2d727973 100644
--- a/src/emerge.h
+++ b/src/emerge.h
@@ -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