From a765b1ecc391f538227184caf6c8f45cc0a81125 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 22 Sep 2011 14:24:05 +0200 Subject: [PATCH] vbscript: Added interp_incc implementation. --- dlls/vbscript/interp.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index c95183d93ad..08ea83e3f20 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -1518,8 +1518,28 @@ static HRESULT interp_neg(exec_ctx_t *ctx) static HRESULT interp_incc(exec_ctx_t *ctx) { const BSTR ident = ctx->instr->arg1.bstr; - FIXME("%s\n", debugstr_w(ident)); - return E_NOTIMPL; + VARIANT v; + ref_t ref; + HRESULT hres; + + TRACE("\n"); + + hres = lookup_identifier(ctx, ident, VBDISP_LET, &ref); + if(FAILED(hres)) + return hres; + + if(ref.type != REF_VAR) { + FIXME("ref.type is not REF_VAR\n"); + return E_FAIL; + } + + hres = VarAdd(stack_top(ctx, 0), ref.u.v, &v); + if(FAILED(hres)) + return hres; + + VariantClear(ref.u.v); + *ref.u.v = v; + return S_OK; } static const instr_func_t op_funcs[] = {