Jacek Caban (@jacek) commented about dlls/oleaut32/variant.c:
hRet = VarR8FromStr(V_BSTR(pVarIn), LOCALE_USER_DEFAULT, 0, &V_R8(&varIn)); if (FAILED(hRet)) break; - V_VT(pVarOut) = VT_R8; pVarIn = &varIn; + *pVarOut = *pVarIn; + V_VT(pVarOut) = VT_R8;
This will work, but while reviewing this I noticed that current handling of VT_R4 and VT_R8 is not exactly right, overflow checks don't really make sense. Fixing that allows to simplify VT_BSTR case a bit. Please take a look at https://gitlab.winehq.org/jacek/wine/-/commits/varabs/ and if it looks good to you, update MR with that branch (it also contains BSTR allocation fixup). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2175#note_24071