aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2013-09-20 11:36:33 +0200
committerMike Pall <mike>2013-09-20 11:36:33 +0200
commit47df3ae5136521da96767e6daed4cdd241de2fa6 (patch)
tree94c8b542903a4799e699286bec9b6711ecf737dd /src
parent54af4e7c762cfc8600a2e47418940468b54038a0 (diff)
downloadluajit-47df3ae5136521da96767e6daed4cdd241de2fa6.tar.gz
luajit-47df3ae5136521da96767e6daed4cdd241de2fa6.tar.bz2
luajit-47df3ae5136521da96767e6daed4cdd241de2fa6.zip
Properly fix loading of embedded bytecode.
Diffstat (limited to '')
-rw-r--r--src/lj_bcread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_bcread.c b/src/lj_bcread.c
index 9f025500..940db9dd 100644
--- a/src/lj_bcread.c
+++ b/src/lj_bcread.c
@@ -446,7 +446,8 @@ GCproto *lj_bcread(LexState *ls)
446 setprotoV(L, L->top, pt); 446 setprotoV(L, L->top, pt);
447 incr_top(L); 447 incr_top(L);
448 } 448 }
449 if (ls->p < ls->pe || L->top-1 != bcread_oldtop(L, ls)) 449 if ((int32_t)(2*(uint32_t)(ls->pe - ls->p)) > 0 ||
450 L->top-1 != bcread_oldtop(L, ls))
450 bcread_error(ls, LJ_ERR_BCBAD); 451 bcread_error(ls, LJ_ERR_BCBAD);
451 /* Pop off last prototype. */ 452 /* Pop off last prototype. */
452 L->top--; 453 L->top--;