diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-03-10 12:20:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-03-10 12:20:53 +0000 |
commit | f8691004b069f67becd657a02100d7521d1255a9 (patch) | |
tree | 4103e48dced85681f6c85ae4023b74a9becdb111 /src/vim9execute.c | |
parent | 56b84b1728e68f984446ec2698716cb8a1f6871d (diff) | |
download | vim-git-f8691004b069f67becd657a02100d7521d1255a9.tar.gz |
patch 8.2.4534: Vim9: "is" operator with empty string and null returns truev8.2.4534
Problem: Vim9: "is" operator with empty string and null returns true.
Solution: Consider empty string and null to be different for "is".
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index 9f6cc5d91..d908e6431 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -3313,9 +3313,8 @@ exec_instructions(ectx_T *ectx) break; default: tv->v_type = VAR_STRING; - tv->vval.v_string = vim_strsave( - iptr->isn_arg.string == NULL - ? (char_u *)"" : iptr->isn_arg.string); + tv->vval.v_string = iptr->isn_arg.string == NULL + ? NULL : vim_strsave(iptr->isn_arg.string); } break; |