Re: advpack: Forward AddDelBackupEntryA to its unicode counterpart
22 Mar
2006
22 Mar
'06
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
7296
Age (days ago)
7296
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard