Fix ai.aspects.avoid always returning an empty table

This commit is contained in:
Celtic Minstrel 2019-11-26 23:40:30 -05:00
parent cfd23bd850
commit 5b7383cdf2

View file

@ -217,7 +217,7 @@ inline void lua_object<terrain_filter>::from_type(lua_State *L, std::shared_ptr<
lua_createtable(L, locs.size(), 0);
for(const map_location& loc : locs) {
luaW_pushlocation(L, loc);
lua_rawseti(L, -1, lua_rawlen(L, -2) + 1);
lua_rawseti(L, -2, lua_rawlen(L, -2) + 1);
}
} else lua_pushnil(L);
}