[PATCH 4/8] msi: Fix merging string type checks.

Andrew Eikum andrew at brightnightgames.com
Tue Oct 20 08:40:51 CDT 2009

Hib Eris wrote:
> On Tue, Oct 20, 2009 at 3:06 PM, Alexandre Julliard <julliard at winehq.org> wrote:
>> Surely you don't need StrCmpNW to compare one character...
> I guess not. This may sound as a stupid question to you, but how should I do it?
> Can I just do
> if (type[0] == 's')  ?
> I am a bit worried that this comparison on WCHAR is not guaranteed to work?
> Hib Eris

WCHAR is just unsigned short, so the char will promote to short, padding 
with 0s on the high byte.  The comparison will work fine.

More information about the wine-devel mailing list