summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2024-05-02 13:02:36 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-02 13:02:36 +0200
commitda9d345b3dd8fe67c0c7341e426b09bec8c40abd (patch)
tree9c173838b8c55999619ddf3073e49e149562cb10 /src/eval.c
parent3ca2ae180ae26d0aa29b33ef158f79be811d6be8 (diff)
patch 9.1.0387: Vim9: null value tests not sufficientv9.1.0387
Problem: Vim9: null value tests not sufficient Solution: Add a more comprehensive test for null values (Yegappan Lakshmanan) closes: #14701 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 21ba1bcfcd..a91ca2d3e5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6403,9 +6403,9 @@ echo_string_core(
{
class_T *cl = tv->vval.v_class;
char *s = "class";
- if (cl && IS_INTERFACE(cl))
+ if (cl != NULL && IS_INTERFACE(cl))
s = "interface";
- else if (cl && IS_ENUM(cl))
+ else if (cl != NULL && IS_ENUM(cl))
s = "enum";
size_t len = STRLEN(s) + 1 +
(cl == NULL ? 9 : STRLEN(cl->class_name)) + 1;