diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-07-17 22:04:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-07-17 22:04:48 +0200 |
commit | fb9bc4829a1442fc8e93f078c9f923c9d382dbd2 (patch) | |
tree | df774c3def92d3a7000d3475ac06f0155b31effe /src | |
parent | 537443018d41918639695a442c91b34ccec69fc3 (diff) | |
download | vim-git-fb9bc4829a1442fc8e93f078c9f923c9d382dbd2.tar.gz |
patch 7.4.787v7.4.787
Problem: snprintf() isn't available everywhere.
Solution: Use vim_snprintf(). (Ken Takata)
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/option.c b/src/option.c index c51d08249..8b6393860 100644 --- a/src/option.c +++ b/src/option.c @@ -8291,9 +8291,9 @@ set_bool_option(opt_idx, varp, value, opt_flags) if (!starting) { char_u buf_old[2], buf_new[2], buf_type[7]; - snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE); - snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE); - sprintf((char *)buf_type, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_old, 2, "%d", old_value ? TRUE: FALSE); + vim_snprintf((char *)buf_new, 2, "%d", value ? TRUE: FALSE); + vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, buf_new, -1); set_vim_var_string(VV_OPTION_OLD, buf_old, -1); set_vim_var_string(VV_OPTION_TYPE, buf_type, -1); @@ -8841,9 +8841,9 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags) if (!starting && errmsg == NULL) { char_u buf_old[11], buf_new[11], buf_type[7]; - snprintf((char *)buf_old, 10, "%ld", old_value); - snprintf((char *)buf_new, 10, "%ld", value); - snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_old, 10, "%ld", old_value); + vim_snprintf((char *)buf_new, 10, "%ld", value); + vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, buf_new, -1); set_vim_var_string(VV_OPTION_OLD, buf_old, -1); set_vim_var_string(VV_OPTION_TYPE, buf_type, -1); diff --git a/src/version.c b/src/version.c index cef927dbb..fe17b71ff 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 787, +/**/ 786, /**/ 785, |