From 18117ccbab3232cf0d81219a37d52837e898ab7b Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 31 Oct 2019 19:16:01 +0100 Subject: [PATCH] vbscript: Support VT_EMPTY in stack_pop_bool. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/vbscript/interp.c | 1 + dlls/vbscript/tests/lang.vbs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 2b681a0677b..ad6454aa578 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -374,6 +374,7 @@ static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b) *b = V_BOOL(val.v); break; case VT_NULL: + case VT_EMPTY: *b = FALSE; break; case VT_I2: diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index f7cdc92ec4e..0520038a023 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -329,6 +329,14 @@ end if while false wend +if empty then + ok false, "if empty executed" +end if + +while empty + ok false, "while empty executed" +wend + x = 0 WHILE x < 3 : x = x + 1 Wend