projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ad17a2
)
Fix facedir > 23 causes segfault in client
author
Craig Robbins
<kde.psych@gmail.com>
Fri, 9 Jan 2015 05:42:03 +0000
(15:42 +1000)
committer
Craig Robbins
<kde.psych@gmail.com>
Fri, 9 Jan 2015 05:42:03 +0000
(15:42 +1000)
See issue #2017
Applied kahrl's gist
src/mapnode.cpp
patch
|
blob
|
history
diff --git
a/src/mapnode.cpp
b/src/mapnode.cpp
index 3940c58679f1422384be1b175ce7371f084762c7..056b940548240b9d869b02f142fa3b7973ed949e 100644
(file)
--- a/
src/mapnode.cpp
+++ b/
src/mapnode.cpp
@@
-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;
}