diff options
author | watiko <service@mail.watiko.net> | 2015-11-28 20:14:49 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2015-11-28 20:15:28 +0900 |
commit | 597547e7977c6c9404ec4d730bfc02584c9f1564 (patch) | |
tree | 6479e9c587f13f865b80f2ea20417db70c63ef1b /src | |
parent | 972b43459b22d5500cbb8f0004f45d8bdfacecf8 (diff) | |
download | rneovim-597547e7977c6c9404ec4d730bfc02584c9f1564.tar.gz rneovim-597547e7977c6c9404ec4d730bfc02584c9f1564.tar.bz2 rneovim-597547e7977c6c9404ec4d730bfc02584c9f1564.zip |
Use vim_snprintf instead of sprintf
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 6ec0d4a095..3e74d4d23c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1798,8 +1798,8 @@ do_set ( if (saved_origval != NULL) { char_u buf_type[7]; - sprintf((char *)buf_type, "%s", - (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_type, 7, "%s", + (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, *(char_u **)varp, -1); set_vim_var_string(VV_OPTION_OLD, saved_origval, -1); @@ -2385,8 +2385,8 @@ set_string_option ( // call autocommand after handling side effects if (saved_oldval != NULL) { char_u buf_type[7]; - sprintf((char *)buf_type, "%s", - (opt_flags & OPT_LOCAL) ? "local" : "global"); + vim_snprintf((char *)buf_type, 7, "%s", + (opt_flags & OPT_LOCAL) ? "local" : "global"); set_vim_var_string(VV_OPTION_NEW, *varp, -1); set_vim_var_string(VV_OPTION_OLD, saved_oldval, -1); set_vim_var_string(VV_OPTION_TYPE, buf_type, -1); |