]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
LJ_GC64: Fix lua_concat().
authorMike Pall <mike>
Wed, 10 Aug 2022 17:27:53 +0000 (19:27 +0200)
committerMike Pall <mike>
Wed, 10 Aug 2022 17:27:53 +0000 (19:27 +0200)
Reported by Mathias Westerdahl.

src/lj_api.c

index d869ebf8f4e657826b2032ece5effdea05f7d2ba..e6b6747809aab0ac4476387f843ec1869b95a39c 100644 (file)
@@ -779,7 +779,7 @@ LUA_API void lua_concat(lua_State *L, int n)
        L->top -= n;
        break;
       }
-      n -= (int)(L->top - top);
+      n -= (int)(L->top - (top - 2*LJ_FR2));
       L->top = top+2;
       lj_vm_call(L, top, 1+1);
       L->top -= 1+LJ_FR2;