From 4fdead5e3ca0e1fd3dfa31ab295c44f7556773c6 Mon Sep 17 00:00:00 2001 From: Luca Salmin <40690017+morgoth990@users.noreply.github.com> Date: Mon, 14 Mar 2022 19:43:40 +0100 Subject: [PATCH] yield from interrupt #287 (#413) Co-authored-by: luca salmin --- VM/src/lvmexecute.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/VM/src/lvmexecute.cpp b/VM/src/lvmexecute.cpp index 6c31d36..5e2ef68 100644 --- a/VM/src/lvmexecute.cpp +++ b/VM/src/lvmexecute.cpp @@ -77,6 +77,11 @@ if (LUAU_UNLIKELY(!!interrupt)) \ { /* the interrupt hook is called right before we advance pc */ \ VM_PROTECT(L->ci->savedpc++; interrupt(L, -1)); \ + if (L->status != 0) \ + { \ + L->ci->savedpc--; \ + goto exit; \ + } \ } \ } #endif