summaryrefslogtreecommitdiff
path: root/src/script/common/c_converter.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-06-06 19:13:29 +0200
committerGitHub <noreply@github.com>2019-06-06 19:13:29 +0200
commitcb00632e23a41d8d171631de9d85e168b251b80e (patch)
tree684787f3056df0d5ab7b0e1cb504c2b6866ae334 /src/script/common/c_converter.cpp
parent7379aa74cf98c7e4c7aa5325ef1531d412a0abac (diff)
downloadminetest-cb00632e23a41d8d171631de9d85e168b251b80e.tar.gz
minetest-cb00632e23a41d8d171631de9d85e168b251b80e.tar.bz2
minetest-cb00632e23a41d8d171631de9d85e168b251b80e.zip
HTTP API: Allow binary downloads and headers (#8573)
Add minetest.features.httpfetch_binary_data
Diffstat (limited to 'src/script/common/c_converter.cpp')
-rw-r--r--src/script/common/c_converter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/common/c_converter.cpp b/src/script/common/c_converter.cpp
index dfd3f5cea..b9d6f0494 100644
--- a/src/script/common/c_converter.cpp
+++ b/src/script/common/c_converter.cpp
@@ -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);