fix(set_option_from_tv): use v_bool to access boolean option

This commit is contained in:
James McCoy
2023-12-18 17:22:57 -05:00
parent 92d620ad92
commit ad8bd45207

View File

@@ -1644,7 +1644,7 @@ static void set_option_from_tv(const char *varname, typval_T *varp)
emsg(_(e_stringreq));
return;
}
numval = (long)varp->vval.v_number;
numval = varp->vval.v_bool;
strval = "0"; // avoid using "false"
} else {
numval = (long)tv_get_number_chk(varp, &error);