On Mon Mar 3 04:22:16 2025 +0000, Bernhard Übelacker wrote:
This isn't just a precision issue, but completely garbage output, right?
I think this windows version handles `VT_R4` and `VT_R8` the same. Therefore VT_R4 returns the interpretation as a double instead of a float. This is what gdb shows when placing the 0.125 to some memory and casting this to float or double:
$ gdb -q --args tools/makedep Reading symbols from tools/makedep... (gdb) starti ... (gdb) set *(long long*)$rsp = 0 (gdb) x/8xb $rsp 0x7fffffffd600: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (gdb) set *(float*)$rsp = 0.125 (gdb) x/8xb $rsp 0x7fffffffd600: 0x00 0x00 0x00 0x3e 0x00 0x00 0x00 0x00 (gdb) print *(float*)$rsp $1 = 0.125 (gdb) print *(double*)$rsp $2 = 5.1392085562440189e-315 (gdb)
So it seems not completely garbage, just the bits from a float interpreted as double. I will try to push a check_PropVariantToBSTR2 version later.
I pushed v2, is this somewhere near what you suggested?