1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

HTTP API: Allow binary downloads and headers (#8573)

Add minetest.features.httpfetch_binary_data
This commit is contained in:
SmallJoker
2019-06-06 19:13:29 +02:00
committed by GitHub
parent 7379aa74cf
commit cb00632e23
6 changed files with 17 additions and 15 deletions

View File

@@ -540,9 +540,9 @@ v3s16 getv3s16field_default(lua_State *L, int table,
}
void setstringfield(lua_State *L, int table,
const char *fieldname, const char *value)
const char *fieldname, const std::string &value)
{
lua_pushstring(L, value);
lua_pushlstring(L, value.c_str(), value.length());
if(table < 0)
table -= 1;
lua_setfield(L, table, fieldname);