locale: [1/1] patch - 0x10000000 flag is NORM_STOP_ON_NULL

Donat Enikeev donat at enikeev.net
Sat Apr 4 16:09:07 CDT 2015


Hi all,

While investigating reasons of one application not running with Wine, I met again:

fixme:nls:CompareStringEx semi-stub behavor for flag(s) 0x10000000

Quite common message affecting a lot of applications. Decided to get to bottom of this. 

Found no information about this flag on MSDN. While it was said in comment at locale.c about some diacritic language specifics I had been digging in wrong direction for a while, and checking .NET equivalents without any success though. Then started to search by 0x10000000 on different codes hosting and found 

const DWORD NORM_STOP_ON_NULL = 0x10000000;

At http://andrew-grechkin.googlecode.com/svn-history/r250/trunk/libbase/include/libbase/pcstr.hpp

So, I assumed that idea of this flag is to stop comparing whenever null is met even if length is defined explicitly. I've checked and confirmed this version on free Windows 10 TechPreview+Visual studio by some tests (sample code and output attached as well) for: CompareStringEx, CompareStringW, CompareStringA

Please have a look, one can imagine case when incorrect processing of this flag could lead to completely unexpected behavior.

P.s. Confirmed correctness of some presenting tests in wine.git

--de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: output_windows_10.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150405/e409e504/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConsoleApplication1.cpp
Type: text/x-c++
Size: 3192 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150405/e409e504/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-NORM_STOP_ON_NULL-flag.patch
Type: text/x-diff
Size: 7433 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150405/e409e504/attachment.patch>


More information about the wine-patches mailing list