# HG changeset patch # User Bram Moolenaar # Date 1580249705 -3600 # Node ID 9b97da610cab326e82d3e150de2264b797f89d4e # Parent 17838f264b539021e195f2aba50478cc32d0af1f patch 8.2.0172: Coverity warning for not restoring character Commit: https://github.com/vim/vim/commit/4549ece47cc8d6487d8e64ae37361fea87e3ad39 Author: Bram Moolenaar Date: Tue Jan 28 23:13:42 2020 +0100 patch 8.2.0172: Coverity warning for not restoring character Problem: Coverity warning for not restoring character. Solution: Restore the character also in case of failure. diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 172, +/**/ 171, /**/ 170, diff --git a/src/vim9script.c b/src/vim9script.c --- a/src/vim9script.c +++ b/src/vim9script.c @@ -358,15 +358,14 @@ handle_import(char_u *arg_start, garray_ } sv = NULL; } + *arg = cc; + arg = skipwhite(arg); imported = new_imported(gap != NULL ? gap : &SCRIPT_ITEM(import_sid)->sn_imports); if (imported == NULL) return NULL; - *arg = cc; - arg = skipwhite(arg); - // TODO: check for "as" following // imported->imp_name = vim_strnsave(as_ptr, as_len); imported->imp_name = vim_strnsave(name, name_len);