From f33d31693ed2ab7d2a29320181b6aba2c12f76d3 Mon Sep 17 00:00:00 2001 From: Craig Robbins Date: Thu, 7 Aug 2014 15:39:12 +1000 Subject: Fix seg fault if popping from empty stack (L-system trees) See: https://github.com/minetest/minetest/issues/1525 Background Wuzzy2: If you attempt to spawn a L-system tree with minetest.spawn_tree, you can make Minetest crash if it is attempted to pop an empty stack. ShadowNinja: This shouldn't cause a segmentation fault, but it should throw a Lua error Commit Description This commit throws a Lua error instead of causing a segmentation fault. The server will still "crash" but will include a Lua backtrace. L-Systems fix randomness Unless a random seed is provided (via Lua treedef) seed the PRNG with a different seed for each tree Resolves: https://github.com/minetest/minetest/issues/1469 Fix l-system crash when treedef random_level not set by Lua --- doc/lua_api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 74487edee..5412c4ccb 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2208,7 +2208,7 @@ treedef={ thin_branches, - boolean true -> use thin (1 node) branches fruit, - string fruit node name fruit_chance, - num chance (0-100) to replace leaves with fruit node - seed, - num random seed + seed, - num random seed; if no seed is provided, the engine will create one } Key for Special L-System Symbols used in Axioms -- cgit v1.2.3