https://bugs.winehq.org/show_bug.cgi?id=53767
--- Comment #5 from Robert Wilhelm sloper42@yahoo.com --- Sorry, there was one line missing. Add ctx->instr->arg2.uint = 0 before add_dynamic_var call.
This should work @@ -1297,8 +1306,22 @@ static HRESULT interp_redim(exec_ctx_t *ctx) }
if(ref.type != REF_VAR) { + int dim; FIXME("got ref.type = %d\n", ref.type); - return E_FAIL; + ctx->func->array_cnt++; + array_desc_t *array_desc; + array_desc = (array_desc_t *)malloc (sizeof(array_desc_t)); + array_desc->dim_cnt = 1; + array_desc->bounds = (SAFEARRAYBOUND *) malloc(sizeof(SAFEARRAYBOUND)); + to_int(stack_top(ctx, 0), &dim); + stack_popn(ctx, 1); + array_desc->bounds->cElements = dim; + array_desc->bounds->lLbound = 0; + ctx->func->array_descs = array_desc; + VARIANT *new; + ctx->instr->arg2.uint = 0; + hres = add_dynamic_var(ctx, identifier, FALSE, &new); + return interp_dim(ctx); }
hres = array_bounds_from_stack(ctx, dim_cnt, &bounds);