You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lua/SOURCES/lua-5-3.4-upvaluejoin.patch

12 lines
368 B

--- lua-5.3.4/src/lapi.c.orig 2019-06-03 17:29:46.376205064 +0200
+++ lua-5.3.4/src/lapi.c 2019-06-03 17:31:08.869905663 +0200
@@ -1289,6 +1289,8 @@
LClosure *f1;
UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
+ if (*up1 == *up2)
+ return;
luaC_upvdeccount(L, *up1);
*up1 = *up2;
(*up1)->refcount++;