Merge branch 'master' into v2.1
This commit is contained in:
@@ -146,6 +146,8 @@ LJLIB_CF(getfenv) LJLIB_REC(.)
|
||||
cTValue *o = L->base;
|
||||
if (!(o < L->top && tvisfunc(o))) {
|
||||
int level = lj_lib_optint(L, 1, 1);
|
||||
if (level < 0)
|
||||
lj_err_arg(L, 1, LJ_ERR_INVLVL);
|
||||
o = lj_debug_frame(L, level, &level);
|
||||
if (o == NULL)
|
||||
lj_err_arg(L, 1, LJ_ERR_INVLVL);
|
||||
@@ -168,6 +170,8 @@ LJLIB_CF(setfenv)
|
||||
setgcref(L->env, obj2gco(t));
|
||||
return 0;
|
||||
}
|
||||
if (level < 0)
|
||||
lj_err_arg(L, 1, LJ_ERR_INVLVL);
|
||||
o = lj_debug_frame(L, level, &level);
|
||||
if (o == NULL)
|
||||
lj_err_arg(L, 1, LJ_ERR_INVLVL);
|
||||
|
||||
Reference in New Issue
Block a user