Fix buffer parameter not working in LuaPerlinNoiseMap::l_getMapSlice()
authorPedro Gimeno <pggh-66ra@personal.formauri.es>
Mon, 8 Jan 2018 20:32:15 +0000 (21:32 +0100)
committerrubenwardy <rubenwardy@gmail.com>
Mon, 8 Jan 2018 20:32:15 +0000 (20:32 +0000)
src/script/lua_api/l_noise.cpp

index 7e76001c136dd47a307b24ca287da3ebb20a530e..85e908356290c008ea6f328ee86445e25f179fa8 100644 (file)
@@ -311,7 +311,7 @@ int LuaPerlinNoiseMap::l_get_map_slice(lua_State *L)
        Noise *n = o->noise;
 
        if (use_buffer)
-               lua_pushvalue(L, 3);
+               lua_pushvalue(L, 4);
        else
                lua_newtable(L);