From: Francis De Brabandere francisdb@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53767 --- dlls/vbscript/interp.c | 4 +++- dlls/vbscript/tests/lang.vbs | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index 937cdaf1c8c..eb7c292122a 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -1316,7 +1316,9 @@ static HRESULT interp_redim(exec_ctx_t *ctx) return hres; }
- if(ref.type != REF_VAR) { + if(ref.type == REF_NONE) { + add_dynamic_var(ctx, identifier, FALSE, &ref.u.v); + }else if(ref.type != REF_VAR) { FIXME("got ref.type = %d\n", ref.type); return E_FAIL; } diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 0307dbe1c42..0025bfeddcf 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1701,6 +1701,11 @@ e = err.number on error goto 0 ok e = 9, "e = " & e ' VBSE_OUT_OF_BOUNDS, can only change rightmost dimension
+redim undeclared_array(3) +ok ubound(undeclared_array) = 3, "ubound(undeclared_array) = " & ubound(undeclared_array) +undeclared_array(3) = 10 +ok undeclared_array(3) = 10, "undeclared_array(3) = " & undeclared_array(3) + sub TestReDimFixed on error resume next