summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_http.cpp
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-03-19 21:37:26 +0300
committeraunsane <aunsane@gmail.com>2018-03-19 21:37:48 +0300
commit165d7791631a9c9ed0998c90b696116593ebfd70 (patch)
tree8d42ce79b67eb1797e6242e096e1919e508ac0c1 /plugins/MirLua/src/m_http.cpp
parent81781c336c74447c4d64b367b958b2c7835f7271 (diff)
MirLua:
- new functions toansi & toucs2 - warning fixes
Diffstat (limited to 'plugins/MirLua/src/m_http.cpp')
-rw-r--r--plugins/MirLua/src/m_http.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MirLua/src/m_http.cpp b/plugins/MirLua/src/m_http.cpp
index e1aece0e12..5d1e7d4519 100644
--- a/plugins/MirLua/src/m_http.cpp
+++ b/plugins/MirLua/src/m_http.cpp
@@ -294,10 +294,10 @@ static void request_SetContent(lua_State *L, int idx, NETLIBHTTPREQUEST *request
static void request_SetContentType(lua_State *L, int idx, NETLIBHTTPREQUEST *request)
{
- if (!lua_isstring(L, 2))
+ if (!lua_isstring(L, idx))
return;
- const char *type = lua_tostring(L, 2);
+ const char *type = lua_tostring(L, idx);
SetHeader(request, "Content-Type", type);
}
@@ -389,7 +389,7 @@ static int request__gc(lua_State *L)
NETLIBHTTPREQUEST **request = (NETLIBHTTPREQUEST**)luaL_checkudata(L, 1, MT_NETLIBHTTPREQUEST);
mir_free((*request)->szUrl);
- for (size_t i = 0; i < (*request)->headersCount; i++) {
+ for (int i = 0; i < (*request)->headersCount; i++) {
mir_free((*request)->headers[i].szName);
mir_free((*request)->headers[i].szValue);
}