Mercurial > vim
comparison src/option.c @ 10205:22e97a250277 v8.0.0003
commit https://github.com/vim/vim/commit/789a5c0e3d27f09456678f0cfb6c1bd2d8ab4a35
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 12 19:51:11 2016 +0200
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 https://github.com/vim/vim/issues/1060)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 12 Sep 2016 20:00:09 +0200 |
parents | 09c7df6f8dd3 |
children | c036c0f636d5 |
comparison
equal
deleted
inserted
replaced
10204:f9673640b6aa | 10205:22e97a250277 |
---|---|
12361 | 12361 |
12362 if (varp != NULL) | 12362 if (varp != NULL) |
12363 { | 12363 { |
12364 if (opt->flags & P_STRING) | 12364 if (opt->flags & P_STRING) |
12365 dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp); | 12365 dict_add_nr_str(d, opt->fullname, 0L, *(char_u **)varp); |
12366 else if (opt->flags & P_NUM) | |
12367 dict_add_nr_str(d, opt->fullname, *(long *)varp, NULL); | |
12366 else | 12368 else |
12367 dict_add_nr_str(d, opt->fullname, *varp, NULL); | 12369 dict_add_nr_str(d, opt->fullname, *(int *)varp, NULL); |
12368 } | 12370 } |
12369 } | 12371 } |
12370 } | 12372 } |
12371 | 12373 |
12372 return d; | 12374 return d; |