aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/openssl.c2
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 *);
static int auxL_swapmetasubtable(lua_State *, const char *, const char *);
static int interpose(lua_State *L, const char *mt) {
- if (!strncmp("__", luaL_checkstring(L, -2), 2)) {
+ if (!strncmp("__", luaL_checkstring(L, lua_absindex(L, -2)), 2)) {
return auxL_swapmetatable(L, mt);
} else {
return auxL_swapmetasubtable(L, mt, "__index");