Skip to content

Commit

Permalink
Areastore: fix "attempt to index a number value"
Browse files Browse the repository at this point in the history
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'
  • Loading branch information
est31 committed Sep 3, 2015
1 parent d493855 commit 2035bfc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/script/lua_api/l_areastore.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 2035bfc

Please sign in to comment.