aboutsummaryrefslogtreecommitdiff
path: root/src/unittest/test_noderesolver.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2021-03-20 13:02:15 +0100
committerGitHub <noreply@github.com>2021-03-20 13:02:15 +0100
commit05719913aca97e53ff5b1dde49e1a033a327551f (patch)
treee775880bc19a4fd53f3b85362c6dc49edb8d4453 /src/unittest/test_noderesolver.cpp
parenta8cc3bdb0890c89d600ef6543c5e9b1b55bcf2b6 (diff)
downloadminetest-05719913aca97e53ff5b1dde49e1a033a327551f.tar.gz
minetest-05719913aca97e53ff5b1dde49e1a033a327551f.tar.bz2
minetest-05719913aca97e53ff5b1dde49e1a033a327551f.zip
Schematic: Properly deal with before/after node resolving and document (#11011)
This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration). Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
Diffstat (limited to 'src/unittest/test_noderesolver.cpp')
-rw-r--r--src/unittest/test_noderesolver.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unittest/test_noderesolver.cpp b/src/unittest/test_noderesolver.cpp
index 28da43620..ed66093a9 100644
--- a/src/unittest/test_noderesolver.cpp
+++ b/src/unittest/test_noderesolver.cpp
@@ -56,6 +56,8 @@ void TestNodeResolver::runTests(IGameDef *gamedef)
class Foobar : public NodeResolver {
public:
+ friend class TestNodeResolver; // m_ndef
+
void resolveNodeNames();
content_t test_nr_node1;