21 Jan
2025
21 Jan
'25
10:38 p.m.
Alfred Agrell (@Alcaro) commented about dlls/propsys/propvar.c:
return hr; }
+static HRESULT string_alloc_from_uint(ULONG64 value, WCHAR **ret) +{ + WCHAR buffer[64], *out = buffer + ARRAY_SIZE(buffer) - 1; + + *out-- = 0; + + do + { + unsigned int next_digit = value % 10; + *out-- = '0' + next_digit; + value = (value - next_digit) / 10;
That subtraction is unnecessary, division rounds toward zero. It just confuses the compiler. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7163#note_92417