Mercurial > vim
diff src/vim9compile.c @ 24637:4a4f64cdc798 v8.2.2857
patch 8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level
Commit: https://github.com/vim/vim/commit/ff65288aa89dcd50760ad942d58baff70c6e93e6
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 16 15:24:49 2021 +0200
patch 8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level
Problem: Vim9: exception in ISN_INSTR caught at wrong level.
Solution: Set the starting trylevel in exec_instructions(). (closes https://github.com/vim/vim/issues/8214)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 May 2021 15:30:03 +0200 |
parents | 07b3d21a8b4b |
children | 668df21d8bc6 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -3131,7 +3131,8 @@ compile_string(isn_T *isn, cctx_T *cctx) s = skipwhite(s); trailing_error = *s != NUL; - if (expr_res == FAIL || trailing_error) + if (expr_res == FAIL || trailing_error + || ga_grow(&cctx->ctx_instr, 1) == FAIL) { if (trailing_error) semsg(_(e_trailing_arg), s); @@ -3185,7 +3186,7 @@ compile_arguments(char_u **arg, cctx_T * return FAIL; ++*argcount; - if (is_searchpair && *argcount == 5 + if (is_searchpair && *argcount >= 5 && cctx->ctx_instr.ga_len == instr_count + 1) { isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;