diff options
author | Mike Pall <mike> | 2011-05-09 18:16:39 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-05-09 20:46:58 +0200 |
commit | 67d3ac9b19caba68069e83d1e3e9de14994d66cd (patch) | |
tree | ad1b075e255dcaabebfea8b6e5e70aa4a3eb63d2 /src/lj_mcode.c | |
parent | 28e87d33e931661e8118a25b293213938a9e0af4 (diff) | |
download | luajit2-67d3ac9b19caba68069e83d1e3e9de14994d66cd.tar.gz |
Fix some portability issues with the JIT compiler.
Diffstat (limited to 'src/lj_mcode.c')
-rw-r--r-- | src/lj_mcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_mcode.c b/src/lj_mcode.c index 104e4925..b3ce1f7f 100644 --- a/src/lj_mcode.c +++ b/src/lj_mcode.c @@ -274,7 +274,7 @@ MCode *lj_mcode_patch(jit_State *J, MCode *ptr, int finish) } else { MCode *mc = J->mcarea; /* Try current area first to use the protection cache. */ - if (ptr >= mc && ptr < mc + J->szmcarea) { + if (ptr >= mc && ptr < (MCode *)((char *)mc + J->szmcarea)) { mcode_protect(J, MCPROT_GEN); return mc; } @@ -282,7 +282,7 @@ MCode *lj_mcode_patch(jit_State *J, MCode *ptr, int finish) for (;;) { mc = ((MCLink *)mc)->next; lua_assert(mc != NULL); - if (ptr >= mc && ptr < mc + ((MCLink *)mc)->size) { + if (ptr >= mc && ptr < (MCode *)((char *)mc + ((MCLink *)mc)->size)) { mcode_setprot(mc, ((MCLink *)mc)->size, MCPROT_GEN); return mc; } |