Nikolay Sivov (@nsivov) commented about dlls/shlwapi/string.c:
- if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax))
- if (!lpszDest || !cchMax)
- return lpszDest;
- if (llBytes < 1024) /* 1K */
- {
- WCHAR wszBytesFormat[64];
- LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64);
- swprintf(lpszDest, cchMax, wszBytesFormat, (int)llBytes);
- return lpszDest;
- }
- dBytes = PrepareDouble(llBytes, &bfFormat);
- dBytes = floor(dBytes / bfFormat.dDivisor) / bfFormat.dNormaliser;
- if (!FormatDouble(dBytes, bfFormat.nDecimals, lpszDest, cchMax))
Does it work if you simply call Ex() function here with TRUNCATE flag?