Skip to content

Commit 183c81b

Browse files
doserjIlya Zhuravlev
authored and
Ilya Zhuravlev
committedJan 12, 2013
fix integer overflow (fixes luanti-org#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 luanti-org#414.
1 parent 076f13c commit 183c81b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/map.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
16511651
Collect information about current node
16521652
*/
16531653
s8 liquid_level = -1;
1654-
u8 liquid_kind = CONTENT_IGNORE;
1654+
content_t liquid_kind = CONTENT_IGNORE;
16551655
LiquidType liquid_type = nodemgr->get(n0).liquid_type;
16561656
switch (liquid_type) {
16571657
case LIQUID_SOURCE:

0 commit comments

Comments
 (0)
Please sign in to comment.