Skip to content

Commit d576235

Browse files
committedJan 9, 2015
Fix facedir > 23 causes segfault in client
See issue #2017 Applied kahrl's gist
1 parent 7ad17a2 commit d576235

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/mapnode.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ u8 MapNode::getFaceDir(INodeDefManager *nodemgr) const
119119
{
120120
const ContentFeatures &f = nodemgr->get(*this);
121121
if(f.param_type_2 == CPT2_FACEDIR)
122-
return getParam2() & 0x1F;
122+
return (getParam2() & 0x1F) % 24;
123123
return 0;
124124
}
125125

0 commit comments

Comments
 (0)
Please sign in to comment.