Skip to content
Snippets Groups Projects
Commit 183c81b5 authored by Jürgen Doser's avatar Jürgen Doser Committed by Ilya Zhuravlev
Browse files

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.
parent 076f13cc
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment