summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorJürgen Doser <jurgen.doser@gmail.com>2013-01-12 20:20:21 +0100
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2013-01-12 23:32:09 +0400
commit183c81b5ecf4f9350936737f5091073d81733d73 (patch)
treeb96fb4fa39c200d2d794b87d4ffc771b19a12985 /src/map.cpp
parent076f13cc01916ea9942fcadeb1ec40924c8cde8b (diff)
downloadminetest-183c81b5ecf4f9350936737f5091073d81733d73.tar.gz
minetest-183c81b5ecf4f9350936737f5091073d81733d73.tar.bz2
minetest-183c81b5ecf4f9350936737f5091073d81733d73.zip
fix integer overflow (fixes #414)
liquid_kind was declared as an u8, but used to hold a content_t value, which is delcared to be a u16. changing this fixes (at least for me) the problem reported in bug #414.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 2845f3a67..0e9b121d7 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1651,7 +1651,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
Collect information about current node
*/
s8 liquid_level = -1;
- u8 liquid_kind = CONTENT_IGNORE;
+ content_t liquid_kind = CONTENT_IGNORE;
LiquidType liquid_type = nodemgr->get(n0).liquid_type;
switch (liquid_type) {
case LIQUID_SOURCE: