aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-09-03 05:58:29 +0200
committerest31 <MTest31@outlook.com>2015-09-03 06:17:02 +0200
commit2035bfc3a64e7c0c82f0cb100cd7d4cc588d0203 (patch)
tree931323002cbf8b54c34118c32a3bd7093022fb12 /src/script
parentd4938554818aa71aceb0d360f33c6cfd42f67008 (diff)
downloadminetest-2035bfc3a64e7c0c82f0cb100cd7d4cc588d0203.tar.gz
minetest-2035bfc3a64e7c0c82f0cb100cd7d4cc588d0203.tar.bz2
minetest-2035bfc3a64e7c0c82f0cb100cd7d4cc588d0203.zip
Areastore: fix "attempt to index a number value"
Before, calling get_areas_in_area for an areastore with both include_borders and include_data would result in a lua error, if there was at least one area as result: attempt to index a number value in function 'get_areas_in_area'
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_areastore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/lua_api/l_areastore.cpp b/src/script/lua_api/l_areastore.cpp
index 1e9075119..72fe24b20 100644
--- a/src/script/lua_api/l_areastore.cpp
+++ b/src/script/lua_api/l_areastore.cpp
@@ -45,6 +45,7 @@ static void push_area(lua_State *L, const Area *a,
{
if (!include_borders && !include_data) {
lua_pushboolean(L, true);
+ return;
}
lua_newtable(L);
if (include_borders) {