Skip to content

Commit

Permalink
lj_vmprofile.c: Fix file header initialization
Browse files Browse the repository at this point in the history
There was a bug where the magic and version numbers would be left as
zeros.
  • Loading branch information
lukego committed Nov 20, 2017
1 parent 2b89796 commit 5cac382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lj_vmprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lj_vmprofile.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct VMProfileTraceCount {
/* Complete set of counters for VM and traces. */
typedef struct VMProfile {
uint32_t magic; /* 0x1d50f007 */
uint16_t major, minor; /* 2, 0 */
uint16_t major, minor; /* 3, 0 */
/* The profiler always bumps exactly one VM state counter. */
VMProfileCount vm[LJ_VMST__MAX];
/* The profiler also bumps exactly one per-trace counter for the
Expand Down

0 comments on commit 5cac382

Please sign in to comment.