From be6b784766655d38ea28fb382d3af6789e4e4a89 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 26 Oct 2015 14:51:56 +0300 Subject: option: Fix strange condition in add_dir function --- src/nvim/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit