diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_err.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index 65029092..0d5aa683 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
| @@ -903,9 +903,12 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o) | |||
| 903 | /* Error in context of caller. */ | 903 | /* Error in context of caller. */ |
| 904 | LJ_NOINLINE void lj_err_callermsg(lua_State *L, const char *msg) | 904 | LJ_NOINLINE void lj_err_callermsg(lua_State *L, const char *msg) |
| 905 | { | 905 | { |
| 906 | cTValue *frame = L->base-1; | 906 | TValue *frame = L->base-1; |
| 907 | cTValue *pframe = frame_islua(frame) ? frame_prevl(frame) : | 907 | TValue *pframe = NULL; |
| 908 | frame_iscont(frame) ? frame_prevd(frame) : NULL; | 908 | if (frame_islua(frame)) |
| 909 | pframe = frame_prevl(frame); | ||
| 910 | else if (frame_iscont(frame)) | ||
| 911 | L->base = (pframe = frame_prevd(frame))+1; /* Remove metamethod frame. */ | ||
| 909 | err_loc(L, msg, pframe, frame); | 912 | err_loc(L, msg, pframe, frame); |
| 910 | lj_err_run(L); | 913 | lj_err_run(L); |
| 911 | } | 914 | } |
