[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [10/11] kernel32: Implement LCMAP_FULLWIDTH.
From: Alexandre Julliard <julliard () winehq ! org>
Date: 2016-09-28 2:52:26
Message-ID: 8760pghh1x.fsf () winehq ! org
[Download RAW message or body]
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.
--
Alexandre Julliard
julliard@winehq.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic