Dmitry Timoshkov dmitry@baikal.ru writes:
Nikolay Sivov nsivov@codeweavers.com wrote:
if (!src) { *dst = 0; return 1; }
if (!WideCharToMultiByte(CP_ACP, 0, src, -1, dest, dest_len, NULL, NULL)) dest[dest_len - 1] = 0; return dest_len;
This does the same thing.
That's the whole point: do the same thing using simpler code.
It doesn't do the same thing, the return value is wrong.