From 69e11b58b4db0952f11a5ff85aa7150b5f5b8db8 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sun, 3 Apr 2022 02:36:01 -0700 Subject: vim-patch:8.2.4402: missing parenthesis may cause unexpected problems Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83 --- src/nvim/regexp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/nvim/regexp.c') diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index d3c43e530a..53add57736 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -279,15 +279,15 @@ static void init_class_tab(void) done = true; } -# define ri_digit(c) (c < 0x100 && (class_tab[c] & RI_DIGIT)) -# define ri_hex(c) (c < 0x100 && (class_tab[c] & RI_HEX)) -# define ri_octal(c) (c < 0x100 && (class_tab[c] & RI_OCTAL)) -# define ri_word(c) (c < 0x100 && (class_tab[c] & RI_WORD)) -# define ri_head(c) (c < 0x100 && (class_tab[c] & RI_HEAD)) -# define ri_alpha(c) (c < 0x100 && (class_tab[c] & RI_ALPHA)) -# define ri_lower(c) (c < 0x100 && (class_tab[c] & RI_LOWER)) -# define ri_upper(c) (c < 0x100 && (class_tab[c] & RI_UPPER)) -# define ri_white(c) (c < 0x100 && (class_tab[c] & RI_WHITE)) +# define ri_digit(c) ((c) < 0x100 && (class_tab[c] & RI_DIGIT)) +# define ri_hex(c) ((c) < 0x100 && (class_tab[c] & RI_HEX)) +# define ri_octal(c) ((c) < 0x100 && (class_tab[c] & RI_OCTAL)) +# define ri_word(c) ((c) < 0x100 && (class_tab[c] & RI_WORD)) +# define ri_head(c) ((c) < 0x100 && (class_tab[c] & RI_HEAD)) +# define ri_alpha(c) ((c) < 0x100 && (class_tab[c] & RI_ALPHA)) +# define ri_lower(c) ((c) < 0x100 && (class_tab[c] & RI_LOWER)) +# define ri_upper(c) ((c) < 0x100 && (class_tab[c] & RI_UPPER)) +# define ri_white(c) ((c) < 0x100 && (class_tab[c] & RI_WHITE)) // flags for regflags #define RF_ICASE 1 // ignore case -- cgit