aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.h
diff options
context:
space:
mode:
authorWuzzy <Wuzzy@disroot.org>2022-05-23 20:50:10 +0000
committerGitHub <noreply@github.com>2022-05-23 22:50:10 +0200
commit0f9c78c3ebf920fac65030e66367b9940055075f (patch)
tree12dac38024851e6f9ca576f4a8d56f4c27aba186 /src/nodedef.h
parentc660218e43bfbc9740001d6707618d5eba51b664 (diff)
downloadminetest-0f9c78c3ebf920fac65030e66367b9940055075f.tar.gz
minetest-0f9c78c3ebf920fac65030e66367b9940055075f.tar.bz2
minetest-0f9c78c3ebf920fac65030e66367b9940055075f.zip
Fix no_texture.png for unknown nodes with ID < 125 (#12329)
Diffstat (limited to 'src/nodedef.h')
-rw-r--r--src/nodedef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nodedef.h b/src/nodedef.h
index f90caff8a..8c817179d 100644
--- a/src/nodedef.h
+++ b/src/nodedef.h
@@ -539,7 +539,7 @@ public:
*/
inline const ContentFeatures& get(content_t c) const {
return
- c < m_content_features.size() ?
+ (c < m_content_features.size() && !m_content_features[c].name.empty()) ?
m_content_features[c] : m_content_features[CONTENT_UNKNOWN];
}