diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-11-24 23:45:05 -0700 |
---|---|---|
committer | Michael Ennen <mike.ennen@gmail.com> | 2016-11-25 18:23:11 -0700 |
commit | 8f84c1da83a2ef0912325f48b23637c706f3f2f0 (patch) | |
tree | c6b1eda7b44aed43e466596795f90fa7b8fa8d22 /src/nvim/hashtab.c | |
parent | 5f0260808cf3712718555ee177476b8aefd78280 (diff) | |
download | rneovim-8f84c1da83a2ef0912325f48b23637c706f3f2f0.tar.gz rneovim-8f84c1da83a2ef0912325f48b23637c706f3f2f0.tar.bz2 rneovim-8f84c1da83a2ef0912325f48b23637c706f3f2f0.zip |
vim-patch:7.4.1707
Problem: Cannot use empty dictionary key, even though it can be useful.
Solution: Allow using an empty dictionary key.
https://github.com/vim/vim/commit/0921ecff1c5a74541bad6c073e8ade32247403d8
Diffstat (limited to 'src/nvim/hashtab.c')
-rw-r--r-- | src/nvim/hashtab.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c index 7d4ae61fc4..fa4077f22f 100644 --- a/src/nvim/hashtab.c +++ b/src/nvim/hashtab.c @@ -368,8 +368,7 @@ hash_T hash_hash(char_u *key) hash_T hash = *key; if (hash == 0) { - // Empty keys are not allowed, but we don't want to crash if we get one. - return (hash_T) 0; + return (hash_T)0; } // A simplistic algorithm that appears to do very well. |