From fbc2058139566d2530d72ec5e77daf9847ffe252 Mon Sep 17 00:00:00 2001 From: William Ahern Date: Fri, 8 Jan 2016 01:07:28 +0800 Subject: unbreak openssl.rand by fixing auxL_newlib bug --- src/openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openssl.c b/src/openssl.c index b539d87..c777e14 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -778,7 +778,7 @@ static inline size_t auxL_liblen(const auxL_Reg *l) { lua_createtable((L), 0, countof((l)) - 1) #define auxL_newlib(L, l, nups) \ - (auxL_newlibtable((L), (l)), auxL_setfuncs((L), (l), (nups))) + (auxL_newlibtable((L), (l)), lua_insert((L), -(nups + 1)), auxL_setfuncs((L), (l), (nups))) static void auxL_setfuncs(lua_State *L, const auxL_Reg *l, int nups) { for (; l->name; l++) { -- cgit v1.2.3-59-g8ed1b