Mercurial > vim
diff src/drawscreen.c @ 27752:c1d1639b52dd v8.2.4402
patch 8.2.4402: missing parenthesis may cause unexpected problems
Commit: https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
Author: kylo252 <59826753+kylo252@users.noreply.github.com>
Date: Wed Feb 16 19:24:07 2022 +0000
patch 8.2.4402: missing parenthesis may cause unexpected problems
Problem: Missing parenthesis may cause unexpected problems.
Solution: Add more parenthesis is macros. (closes https://github.com/vim/vim/issues/9788)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Feb 2022 20:30:03 +0100 |
parents | 9c96612730a0 |
children | 373f1afadfa3 |
line wrap: on
line diff
--- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -1112,10 +1112,10 @@ fold_line( # define RL_MEMSET(p, v, l) \ do { \ if (wp->w_p_rl) \ - for (ri = 0; ri < l; ++ri) \ + for (ri = 0; ri < (l); ++ri) \ ScreenAttrs[off + (wp->w_width - (p) - (l)) + ri] = v; \ else \ - for (ri = 0; ri < l; ++ri) \ + for (ri = 0; ri < (l); ++ri) \ ScreenAttrs[off + (p) + ri] = v; \ } while (0) #else