diff options
author | ZyX <kp-pav@yandex.ru> | 2015-10-26 14:51:56 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-26 14:51:56 +0300 |
commit | be6b784766655d38ea28fb382d3af6789e4e4a89 (patch) | |
tree | 029abf5e494fec7b97c177110d2b5952fa6b570e | |
parent | 89a84baaf92536e4d463f472a2530e95ae60c7a5 (diff) | |
download | rneovim-be6b784766655d38ea28fb382d3af6789e4e4a89.tar.gz rneovim-be6b784766655d38ea28fb382d3af6789e4e4a89.tar.bz2 rneovim-be6b784766655d38ea28fb382d3af6789e4e4a89.zip |
option: Fix strange condition in add_dir function
-rw-r--r-- | src/nvim/option.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index de0c8e87f5..f30d10d0bb 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -435,7 +435,7 @@ static inline char *add_dir(char *dest, const char *const dir, const char *const suf2, const size_t len2) FUNC_ATTR_NONNULL_RET FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT { - if (dir == NULL && dir_len != 0) { + if (dir == NULL || dir_len == 0) { return dest; } dest = strcpy_comma_escaped(dest, dir, dir_len); |