Fix frame traversal while searching for error function.

This commit is contained in:
Mike Pall 2014-05-12 14:35:30 +02:00
parent 2917288019
commit 624260f831

View File

@ -518,12 +518,14 @@ static ptrdiff_t finderrfunc(lua_State *L)
case FRAME_C: case FRAME_C:
cf = cframe_prev(cf); cf = cframe_prev(cf);
/* fallthrough */ /* fallthrough */
case FRAME_VARG:
frame = frame_prevd(frame);
break;
case FRAME_CONT: case FRAME_CONT:
#if LJ_HASFFI #if LJ_HASFFI
if ((frame-1)->u32.lo == LJ_CONT_FFI_CALLBACK) if ((frame-1)->u32.lo == LJ_CONT_FFI_CALLBACK)
cf = cframe_prev(cf); cf = cframe_prev(cf);
#endif #endif
case FRAME_VARG:
frame = frame_prevd(frame); frame = frame_prevd(frame);
break; break;
case FRAME_CP: case FRAME_CP: