Followup fix for embedded bytecode loader.

This commit is contained in:
Mike Pall 2020-01-14 11:07:07 +01:00
parent 1357a25f81
commit e49863eda1

View File

@ -51,6 +51,7 @@ static LJ_NOINLINE LexChar lex_more(LexState *ls)
if (sz >= LJ_MAX_BUF) { if (sz >= LJ_MAX_BUF) {
if (sz != ~(size_t)0) lj_err_mem(ls->L); if (sz != ~(size_t)0) lj_err_mem(ls->L);
sz = ~(uintptr_t)0 - (uintptr_t)p; sz = ~(uintptr_t)0 - (uintptr_t)p;
if (sz >= LJ_MAX_BUF) sz = LJ_MAX_BUF-1;
ls->endmark = 1; ls->endmark = 1;
} }
ls->pe = p + sz; ls->pe = p + sz;