Commit b9e38a41 authored by Robert Wilhelm's avatar Robert Wilhelm Committed by Alexandre Julliard

vbscript: Support VT_BSTR in stack_pop_bool.

parent bf284dfc
......@@ -417,6 +417,7 @@ static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b)
{
variant_val_t val;
HRESULT hres;
VARIANT_BOOL vb;
hres = stack_pop_val(ctx, &val);
if(FAILED(hres))
......@@ -437,6 +438,12 @@ static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b)
case VT_I4:
*b = V_I4(val.v);
break;
case VT_BSTR:
hres = VarBoolFromStr(V_BSTR(val.v), ctx->script->lcid, 0, &vb);
if(FAILED(hres))
return hres;
*b=vb;
break;
default:
FIXME("unsupported for %s\n", debugstr_variant(val.v));
release_val(&val);
......
......@@ -358,6 +358,22 @@ while empty
wend
x = 0
if "0" then
ok false, "if ""0"" executed"
else
x = 1
end if
Call ok(x = 1, "if ""0"" else not executed")
x = 0
if "-1" then
x = 1
else
ok false, "if ""-1"" else executed"
end if
Call ok(x = 1, "if ""-1"" not executed")
x = 0
WHILE x < 3 : x = x + 1 : Wend
Call ok(x = 3, "x not equal to 3")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment