Skip to content
Snippets Groups Projects
Commit d5762354 authored by Zeno-'s avatar Zeno-
Browse files

Fix facedir > 23 causes segfault in client

See issue #2017
Applied kahrl's gist
parent 7ad17a25
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
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