mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Fix out-of-bounds access in NodeDefManager::nodeboxConnects
This commit is contained in:
parent
1d31533601
commit
ec7a1f02e7
@ -1773,8 +1773,9 @@ bool NodeDefManager::nodeboxConnects(MapNode from, MapNode to,
|
|||||||
};
|
};
|
||||||
if (f2.param_type_2 == CPT2_FACEDIR ||
|
if (f2.param_type_2 == CPT2_FACEDIR ||
|
||||||
f2.param_type_2 == CPT2_COLORED_FACEDIR) {
|
f2.param_type_2 == CPT2_COLORED_FACEDIR) {
|
||||||
|
// FIXME: support arbitrary rotations (to.param2 & 0x1F) (#7696)
|
||||||
return (f2.connect_sides
|
return (f2.connect_sides
|
||||||
& rot[(connect_face * 4) + (to.param2 & 0x1F)]);
|
& rot[(connect_face * 4) + (to.param2 & 0x03)]);
|
||||||
} else if (f2.param_type_2 == CPT2_4DIR ||
|
} else if (f2.param_type_2 == CPT2_4DIR ||
|
||||||
f2.param_type_2 == CPT2_COLORED_4DIR) {
|
f2.param_type_2 == CPT2_COLORED_4DIR) {
|
||||||
return (f2.connect_sides
|
return (f2.connect_sides
|
||||||
|
Loading…
Reference in New Issue
Block a user