diff options
author | James McCoy <jamessan@jamessan.com> | 2017-11-11 10:48:04 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-11-12 16:45:39 -0500 |
commit | 0407ddb36464c46086b608baebf7eed8a9ab60d5 (patch) | |
tree | 6ccc089e24a233cee858a61b56bbf4517d0db782 /src/nvim/api/vim.c | |
parent | cf75de710cfb817871cb614f2091a11f069db2b7 (diff) | |
download | rneovim-0407ddb36464c46086b608baebf7eed8a9ab60d5.tar.gz rneovim-0407ddb36464c46086b608baebf7eed8a9ab60d5.tar.bz2 rneovim-0407ddb36464c46086b608baebf7eed8a9ab60d5.zip |
Use PRId64 to format Integer when calling api_set_error
Integer is a 64-bit type so using %d can produce incorrect results.
test/functional/api/highlight_spec.lua @ 35: highlight api nvim_get_hl_by_id
...W7Xi/neovim-0.2.1/test/functional/api/highlight_spec.lua:46: Expected objects to be the same.
Passed in:
(string) 'Invalid highlight id: 7671724'
Expected:
(string) 'Invalid highlight id: 30000'
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index e5ec018795..d2b0e329c9 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -89,7 +89,8 @@ Dictionary nvim_get_hl_by_id(Integer hl_id, Boolean rgb, Error *err) { Dictionary dic = ARRAY_DICT_INIT; if (syn_get_final_id((int)hl_id) == 0) { - api_set_error(err, kErrorTypeException, "Invalid highlight id: %d", hl_id); + api_set_error(err, kErrorTypeException, + "Invalid highlight id: %" PRId64, hl_id); return dic; } int attrcode = syn_id2attr((int)hl_id); |