mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 14:28:18 +00:00
refactor: missing parenthesis may cause unexpected problems (#17443)
related vim-8.2.{4402,4639}
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user