Module: wine Branch: master Commit: d22252198949d3bf5fd3df77fa686adb8202a390 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d22252198949d3bf5fd3df77fa...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Nov 22 16:48:23 2013 +0100
vbscript: Added support for VT_BYREF|VT_VARIANT to to_int.
---
dlls/vbscript/global.c | 3 +++ dlls/vbscript/tests/lang.vbs | 4 +++- 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index 5088e59..9d8f021 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -152,6 +152,9 @@ static inline HRESULT return_date(VARIANT *res, double date)
HRESULT to_int(VARIANT *v, int *ret) { + if(V_VT(v) == (VT_BYREF|VT_VARIANT)) + v = V_VARIANTREF(v); + switch(V_VT(v)) { case VT_I2: *ret = V_I2(v); diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index f4b0255..06d0284 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -964,7 +964,6 @@ Class Property2 Function Property() End Function
- Sub Test(property) End Sub
@@ -1042,4 +1041,7 @@ for x=1 to 1 forarr(1) = x+1 next
+x=1 +Call ok(forarr(x) = 2, "forarr(x) = " & forarr(x)) + reportSuccess()