https://bugs.winehq.org/show_bug.cgi?id=39473
Bug ID: 39473 Summary: Some of PropVariantCopy tests results are masked by faulty logic Product: Wine Version: 1.7.53 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ole32 Assignee: wine-bugs@winehq.org Reporter: bunglehead@gmail.com Distribution: ---
After commit http://source.winehq.org/git/wine.git/commit/d68c13a8941e4e4c298c7dd0d1e26f6... some test cases are effectively disabled, because of the way operator precedence works:
--- + ok(hr == copy ? DISP_E_BADVARTYPE : STG_E_INVALIDPARAMETER, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr); ---
No matter what 'hr == copy' value is ok() condition is never zero. I'm assuming intention was to do:
--- hr == (copy ? ...) ---
Such simple change brings some tests failures though, but what we have now is wrong in any case.
P.S. discovered by PVS-Studio guys, present in their recent run log.