Re: advpack: Forward AddDelBackupEntryA to its unicode counterpart
March 22, 2006
10:24 a.m.
"James Hawkins" <truiken(a)gmail.com> writes:
+ do + { + MultiByteToWideChar(CP_ACP, 0, ansi_list, len, ptr, len); + + ansi_list += len; + ptr += len; + + len = lstrlenA(ansi_list) + 1; + size += len * sizeof(WCHAR); + list = HeapReAlloc(GetProcessHeap(), 0, list, size); + } while (*ansi_list);
You are assuming that A and W have the same length, that's wrong. Also it will be quite expensive to resize the list all the time. You should determine the full length of the list and then convert everything in one go. -- Alexandre Julliard julliard(a)winehq.org
7385
Age (days ago)
7385
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard