mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Fix facedir > 23 causes segfault in client
See issue #2017 Applied kahrl's gist
This commit is contained in:
@@ -119,7 +119,7 @@ u8 MapNode::getFaceDir(INodeDefManager *nodemgr) const
|
||||
{
|
||||
const ContentFeatures &f = nodemgr->get(*this);
|
||||
if(f.param_type_2 == CPT2_FACEDIR)
|
||||
return getParam2() & 0x1F;
|
||||
return (getParam2() & 0x1F) % 24;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user