mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(set_bool_option): use int value to make bool Object
Boolean options are stored in an int, not a char, so dereferencing "char *varp" is not portable to big-endian systems.
This commit is contained in:
parent
150f2b274d
commit
92d620ad92
@ -2248,7 +2248,7 @@ static const char *set_bool_option(const int opt_idx, char *const varp, const in
|
||||
|
||||
if (options[opt_idx].flags & P_UI_OPTION) {
|
||||
ui_call_option_set(cstr_as_string(options[opt_idx].fullname),
|
||||
BOOLEAN_OBJ(*varp));
|
||||
BOOLEAN_OBJ(*(int *)varp));
|
||||
}
|
||||
if ((int *)varp == &p_ru || (int *)varp == &p_sc) {
|
||||
// in case 'ruler' or 'showcmd' changed
|
||||
|
Loading…
Reference in New Issue
Block a user