summaryrefslogtreecommitdiff
path: root/libraries/lua-md5/3ee1414.patch
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2014-03-19 07:17:41 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-21 13:01:20 -0500
commit6d5d8cbfac9e60d682a847e0c58636b24293cffb (patch)
tree8b8c55a23817b7a5aa53e6148509ea060c9d0510 /libraries/lua-md5/3ee1414.patch
parentcf8cc4ba89d05f3daa5f634c635c0ce4c2b4c641 (diff)
downloadslackbuilds-6d5d8cbfac9e60d682a847e0c58636b24293cffb.tar.gz
libraries/lua-md5: Added (Cryptographic Library for Lua).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/lua-md5/3ee1414.patch')
-rw-r--r--libraries/lua-md5/3ee1414.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/libraries/lua-md5/3ee1414.patch b/libraries/lua-md5/3ee1414.patch
new file mode 100644
index 0000000000..91dd4a13b6
--- /dev/null
+++ b/libraries/lua-md5/3ee1414.patch
@@ -0,0 +1,22 @@
+commit 3ee141422f30f45d841bb21be90474dd1fb68a67
+Author: Tomas Guisasola <tomasguisasola@gmail.com>
+Date: Mon Sep 23 11:26:01 2013 -0300
+
+ Bug correction on upvalues management (thanks to Philipp Janda).
+
+diff --git a/src/compat-5.2.c b/src/compat-5.2.c
+index f54caa2..ce57660 100644
+--- a/src/compat-5.2.c
++++ b/src/compat-5.2.c
+@@ -12,9 +12,9 @@ void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
+ int i;
+ lua_pushstring(L, l->name);
+ for (i = 0; i < nup; i++) /* copy upvalues to the top */
+- lua_pushvalue(L, -nup);
++ lua_pushvalue(L, -(nup + 1));
+ lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */
+- lua_settable(L, -3);
++ lua_settable(L, -(nup + 3)); /* table must be below the upvalues, the name and the closure */
+ }
+ lua_pop(L, nup); /* remove upvalues */
+ }