mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00: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:
@@ -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) {
|
if (options[opt_idx].flags & P_UI_OPTION) {
|
||||||
ui_call_option_set(cstr_as_string(options[opt_idx].fullname),
|
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) {
|
if ((int *)varp == &p_ru || (int *)varp == &p_sc) {
|
||||||
// in case 'ruler' or 'showcmd' changed
|
// in case 'ruler' or 'showcmd' changed
|
||||||
|
Reference in New Issue
Block a user