https://bugs.winehq.org/show_bug.cgi?id=54489
Bug ID: 54489 Summary: vbscript Abs on BSTR returns invalid value Product: Wine Version: 7.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vbscript Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
While porting Visual Pinball to cross platform, I found some code where Abs was returning an invalid value when the source value was a string:
Dim x x = "30000" Debug.Print "x" & "=" & abs(x)
Outputs:
Script.Print 'x=3.08221696253945E-314'
After further research, it turns out the issue is in VarAbs in oleaut32.c:
I've submitted an MR to handle this:
https://gitlab.winehq.org/wine/wine/-/merge_requests/2175