diff options
-rw-r--r-- | src/nvim/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/nvim/ex_eval.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index a2d052c4ec..3307d1bf94 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -48,7 +48,6 @@ set(CONV_SOURCES ex_cmds2.c ex_cmds.c ex_docmd.c - ex_eval.c ex_getln.c farsi.c fileio.c diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index fba0b93253..ef3facb18b 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -11,6 +11,7 @@ */ #include <assert.h> #include <stdbool.h> +#include <stdint.h> #include <inttypes.h> #include "nvim/vim.h" @@ -1307,7 +1308,7 @@ void ex_catch(exarg_T *eap) int skip = FALSE; int caught = FALSE; char_u *end; - int save_char = 0; + char_u save_char = 0; char_u *save_cpo; regmatch_T regmatch; int prev_got_int; @@ -1530,7 +1531,8 @@ void ex_finally(exarg_T *eap) pending |= did_throw ? CSTP_THROW : 0; pending |= did_emsg ? CSTP_ERROR : 0; pending |= got_int ? CSTP_INTERRUPT : 0; - cstack->cs_pending[cstack->cs_idx] = pending; + assert(pending >= CHAR_MIN && pending <= CHAR_MAX); + cstack->cs_pending[cstack->cs_idx] = (char)pending; /* It's mandatory that the current exception is stored in the * cstack so that it can be rethrown at the ":endtry" or be |