Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix facedir > 23 causes segfault in client
See issue #2017
Applied kahrl's gist
  • Loading branch information
Zeno- committed Jan 9, 2015
1 parent 7ad17a2 commit d576235
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mapnode.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit d576235

Please sign in to comment.