From 7b952793d5c46e862a9cdec3d6ac4762370296ed Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Thu, 26 May 2022 04:49:25 +0200 Subject: refactor: missing parenthesis may cause unexpected problems (#17443) related vim-8.2.{4402,4639} --- src/nvim/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/strings.c') diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 319cdeba35..5c2721536d 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -146,7 +146,7 @@ char *vim_strnsave_unquoted(const char *const string, const size_t length) FUNC_ATTR_NONNULL_RET { #define ESCAPE_COND(p, inquote, string_end) \ - (*p == '\\' && inquote && p + 1 < string_end && (p[1] == '\\' || p[1] == '"')) + (*(p) == '\\' && (inquote) && (p) + 1 < (string_end) && ((p)[1] == '\\' || (p)[1] == '"')) size_t ret_length = 0; bool inquote = false; const char *const string_end = string + length; -- cgit