summaryrefslogtreecommitdiff
path: root/src/vim9execute.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-10 12:20:53 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-10 12:20:53 +0000
commitf8691004b069f67becd657a02100d7521d1255a9 (patch)
tree4103e48dced85681f6c85ae4023b74a9becdb111 /src/vim9execute.c
parent56b84b1728e68f984446ec2698716cb8a1f6871d (diff)
downloadvim-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.c5
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;