14 Feb
2023
14 Feb
'23
5:54 p.m.
While working in vbscript, I noticed abs on a `BSTR` value with a positive number would come back with an invalid value. Given the following script: ``` Dim x x = "30000" Debug.Print "x" & "=" & abs(x) ``` Outputs: ``` Script.Print 'x=3.08221696253945E-314' ``` After debugging, `pVarIn` gets the R8 value but is never shallow copied into `pVarOut`. I'm not sure how to write a test case in `oleaut32`, so I included a test case in `vbscript`. -- v7: oleaut32: fix VarAbs function for BSTR with positive values oleaut32: Fix VarAbs function for BSTR with positive values. oleaut32: Remove overflow check for VT_R4 and VT_R8 in VarAbs. https://gitlab.winehq.org/wine/wine/-/merge_requests/2175