Akihiro Sagawa sagawa.aki@gmail.com writes:
@@ -3246,6 +3385,24 @@ INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPW goto done; }
- if (flags & LCMAP_FULLWIDTH)
- {
len = min(srclen, dstlen);
buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!buffer)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return 0;
}
srclen = map_to_fullwidth(src, srclen, buffer, len);
if (!srclen)
{
HeapFree(GetProcessHeap(), 0, buffer);
return 0;
}
src = buffer;
- }
It seems to me that you should be able to do this without allocating an intermediate buffer.