diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_mcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_mcode.c b/src/lj_mcode.c index 94767937..c8ed95e1 100644 --- a/src/lj_mcode.c +++ b/src/lj_mcode.c | |||
@@ -363,7 +363,7 @@ void lj_mcode_limiterr(jit_State *J, size_t need) | |||
363 | sizemcode = (size_t)J->param[JIT_P_sizemcode] << 10; | 363 | sizemcode = (size_t)J->param[JIT_P_sizemcode] << 10; |
364 | sizemcode = (sizemcode + LJ_PAGESIZE-1) & ~(size_t)(LJ_PAGESIZE - 1); | 364 | sizemcode = (sizemcode + LJ_PAGESIZE-1) & ~(size_t)(LJ_PAGESIZE - 1); |
365 | maxmcode = (size_t)J->param[JIT_P_maxmcode] << 10; | 365 | maxmcode = (size_t)J->param[JIT_P_maxmcode] << 10; |
366 | if ((size_t)need > sizemcode) | 366 | if (need * sizeof(MCode) > sizemcode) |
367 | lj_trace_err(J, LJ_TRERR_MCODEOV); /* Too long for any area. */ | 367 | lj_trace_err(J, LJ_TRERR_MCODEOV); /* Too long for any area. */ |
368 | if (J->szallmcarea + sizemcode > maxmcode) | 368 | if (J->szallmcarea + sizemcode > maxmcode) |
369 | lj_trace_err(J, LJ_TRERR_MCODEAL); | 369 | lj_trace_err(J, LJ_TRERR_MCODEAL); |