diff --git a/src/lj_vmprofile.c b/src/lj_vmprofile.c index bb35e9bc54..b9cc8e9a9c 100644 --- a/src/lj_vmprofile.c +++ b/src/lj_vmprofile.c @@ -133,7 +133,7 @@ LUA_API int luaJIT_vmprofile_close(lua_State *L, void *ud) LUA_API int luaJIT_vmprofile_select(lua_State *L, void *ud) { setlightudV(L->base, checklightudptr(L, profile)); - profile = (VMProfile *)ud; + vmprofile_set_profile(ud); return 1; }