Load embedded bytecode with require().

This commit is contained in:
Mike Pall
2011-08-17 00:10:12 +02:00
parent b500b50edc
commit aad7ea3c02
3 changed files with 83 additions and 27 deletions

View File

@@ -457,7 +457,7 @@ GCproto *lj_bcread(LexState *ls)
setprotoV(L, L->top, pt);
incr_top(L);
}
if (ls->n != 0 || L->top-1 != bcread_oldtop(L, ls))
if ((int32_t)ls->n > 0 || L->top-1 != bcread_oldtop(L, ls))
bcread_error(ls, LJ_ERR_BCBAD);
/* Pop off last prototype. */
L->top--;