1
0
forked from aniani/vim

patch 8.0.0003

Problem:    getwinvar() returns wrong Value of boolean and number options,
            especially non big endian systems. (James McCoy)
Solution:   Cast the pointer to long or int. (closes #1060)
This commit is contained in:
Bram Moolenaar
2016-09-12 19:51:11 +02:00
parent b56e7ff0db
commit 789a5c0e3d
3 changed files with 18 additions and 1 deletions

View File

@@ -12363,8 +12363,10 @@ get_winbuf_options(int bufopt)
{
if (opt->flags & P_STRING)
dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp);
else if (opt->flags & P_NUM)
dict_add_nr_str(d, opt->fullname, *(long *)varp, NULL);
else
dict_add_nr_str(d, opt->fullname, *varp, NULL);
dict_add_nr_str(d, opt->fullname, *(int *)varp, NULL);
}
}
}