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:
d493855
)
Areastore: fix "attempt to index a number value"
author
est31
<MTest31@outlook.com>
Thu, 3 Sep 2015 03:58:29 +0000
(
05:58
+0200)
committer
est31
<MTest31@outlook.com>
Thu, 3 Sep 2015 04:17:02 +0000
(06:17 +0200)
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'
src/script/lua_api/l_areastore.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_areastore.cpp
b/src/script/lua_api/l_areastore.cpp
index 1e90751192610e3af992c7d5c30deb918aa66227..72fe24b206c4687933226e09a3c72ddf12a16cce 100644
(file)
--- 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) {