Nikolay Sivov (@nsivov) commented about dlls/shlwapi/string.c:
+ { + case SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT: + dBytes = round(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser; + break; + case SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS: + dBytes = floor(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser; + break; + default: + return E_INVALIDARG; + }
+ /* Not sure about the error code. Can't find a way to trigger the error here */ if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax)) - return NULL; + return E_UNEXPECTED; + E_FAIL is probably more generic. Also comment is not really needed here. I'd also remove documentation comments before function declaration, leaving just function name there.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2609#note_31101