https://bugs.winehq.org/show_bug.cgi?id=53866
Bug ID: 53866 Summary: vbscript fails to handle SAFEARRAY in for...each Product: Wine Version: 7.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
The following vbscript fails:
dim allBalls = getballs
for each b in allballs if b.id >= HighestID then highestID = b.id Next
getballs returns a SAFEARRAY
In interp_newenum, I was able to get SAFEARRAY to work by adding the additional case:
case VT_SAFEARRAY: case VT_VARIANT|VT_ARRAY: case VT_VARIANT|VT_ARRAY|VT_BYREF: { IEnumVARIANT *iter;
hres = create_safearray_iter(V_ISBYREF(v.v) ? *V_ARRAYREF(v.v) : V_ARRAY(v.v), &iter); . . .