14 Feb
2023
14 Feb
'23
6:23 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`. In addition to a test case in `oleaut32`, I've included a test case in `vbscript`. This fixes bug: https://bugs.winehq.org/show_bug.cgi?id=54489 -- v9: oleaut32: fix VarAbs function for BSTR with positive values https://gitlab.winehq.org/wine/wine/-/merge_requests/2175