Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix integer overflow (fixes minetest#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 minetest#414.
  • Loading branch information
doserj authored and Ilya Zhuravlev committed Jan 12, 2013
1 parent 076f13c commit 183c81b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.cpp
Expand Up @@ -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:
Expand Down

0 comments on commit 183c81b

Please sign in to comment.