diff options
Diffstat (limited to 'plugins/MirLua/src/m_http.cpp')
-rw-r--r-- | plugins/MirLua/src/m_http.cpp | 6 |
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); } |