diff options
-rw-r--r-- | src/openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index c777e14..4eba534 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -289,7 +289,7 @@ static int auxL_swapmetatable(lua_State *, const char *); | |||
289 | static int auxL_swapmetasubtable(lua_State *, const char *, const char *); | 289 | static int auxL_swapmetasubtable(lua_State *, const char *, const char *); |
290 | 290 | ||
291 | static int interpose(lua_State *L, const char *mt) { | 291 | static int interpose(lua_State *L, const char *mt) { |
292 | if (!strncmp("__", luaL_checkstring(L, -2), 2)) { | 292 | if (!strncmp("__", luaL_checkstring(L, lua_absindex(L, -2)), 2)) { |
293 | return auxL_swapmetatable(L, mt); | 293 | return auxL_swapmetatable(L, mt); |
294 | } else { | 294 | } else { |
295 | return auxL_swapmetasubtable(L, mt, "__index"); | 295 | return auxL_swapmetasubtable(L, mt, "__index"); |