From fb39246de3efff701a43a29beb1c0a050a0869f8 Mon Sep 17 00:00:00 2001 From: Shuai Meng Date: Sun, 16 Mar 2014 11:26:02 +0800 Subject: [PATCH 07/11] vbscript: Fixed CInt. --- dlls/vbscript/global.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index b968f14..06810c4 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -384,18 +384,11 @@ static HRESULT Global_CCur(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARI static HRESULT Global_CInt(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) { - int val; - HRESULT hres; - TRACE("%s\n", debugstr_variant(arg)); - assert(args_cnt == 1); - hres = to_int(arg, &val); - if(FAILED(hres)) - return hres; - - return return_int(res, val); + V_VT(res) = VT_EMPTY; + return VariantChangeType(res, arg, VARIANT_LOCALBOOL, VT_I2); } static HRESULT Global_CLng(vbdisp_t *This, VARIANT *arg, unsigned args_cnt, VARIANT *res) -- 1.8.1.2