diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-22 22:07:52 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-22 22:07:52 +0100 |
commit | 68e64d2c1735f2a39afa8a0475ae29bedb116684 (patch) | |
tree | fc30407cfebef2a874ca6a83f4351ceef025d657 /src/vim9execute.c | |
parent | 5b529230f144028b67ed1d59207af098c18a1858 (diff) | |
download | vim-git-68e64d2c1735f2a39afa8a0475ae29bedb116684.tar.gz |
patch 8.2.5006: asan warns for undefined behaviorv8.2.5006
Problem: Asan warns for undefined behavior.
Solution: Cast the shifted value to unsigned.
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index 5410aa284..217a97797 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -4091,7 +4091,7 @@ exec_instructions(ectx_T *ectx) case EXPR_LSHIFT: if (arg2 > MAX_LSHIFT_BITS) res = 0; else - res = arg1 << arg2; + res = (uvarnumber_T)arg1 << arg2; break; case EXPR_RSHIFT: if (arg2 > MAX_LSHIFT_BITS) res = 0; |