Ver código fonte

LJ_GC64: Fix lua_concat().

Reported by Mathias Westerdahl.
Mike Pall 3 anos atrás
pai
commit
633f265f67
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/lj_api.c

+ 1 - 1
src/lj_api.c

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