From 1acb9b9de1a0b97a89c808565cc5d08d01a90f6c Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Mon, 1 Sep 2014 16:33:28 +0500 Subject: [PATCH] Fix. Use incorrect storage for values. --- src/lcutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lcutils.c b/src/lcutils.c index 84a695e..cfeac76 100644 --- a/src/lcutils.c +++ b/src/lcutils.c @@ -24,7 +24,7 @@ static void lcurl_storage_ensure_t(lua_State *L, int t){ lua_pop(L, 1); lua_newtable(L); lua_pushvalue(L, -1); - lua_rawseti(L, -3, LCURL_STORAGE_SLIST); + lua_rawseti(L, -3, t); } } @@ -76,7 +76,7 @@ struct curl_slist* lcurl_storage_remove_slist(lua_State *L, int storage, int idx int lcurl_storage_free(lua_State *L, int storage){ lua_rawgeti(L, LCURL_LUA_REGISTRY, storage); - lua_rawgeti(L, -1, 1); // list storage + lua_rawgeti(L, -1, LCURL_STORAGE_SLIST); // list storage if(lua_istable(L, -1)){ lua_pushnil(L); while(lua_next(L, -2) != 0){