<br><br><div class="gmail_quote">2012/10/30 Hans Leidekker <span dir="ltr"><<a href="mailto:hans@codeweavers.com" target="_blank">hans@codeweavers.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, 2012-10-30 at 09:50 +0100, Christian Costa wrote:<br>
> Just by curiosity. What the difference with strncmpW?<br>
<br>
</div>strncmp tests the first string for null termination. You should really<br>
determine that by yourself though :-)<br>
<div class="im"><br>
> >> Do you have a concrete example that does not work with this implementation<br>
> > How about CompareStringOrdinal( "a\0a", 3, "a\0b", 3 )?<br>
> ><br>
> ><br>
> There is a similar test in the patch:<br>
><br>
> � � �WCHAR test1[] = { 't','e','s','t',0 };<br>
> � � �WCHAR test3[] = { 't','e','s','t','3',0 };<br>
><br>
> � � �ret = pCompareStringOrdinal(test1, 5, test3, 5, TRUE);<br>
> � � �ok(ret == CSTR_LESS_THAN, "Got %u, expected %u\n", ret, CSTR_LESS_THAN);<br>
<br>
</div>It's not the same test. The nulls are not at the same index and you're not<br>
asking CompareStringOrdinal to read past a null.<br>
<br>
<br>
</blockquote></div>I just wanted to compare 0 with 3 but you're right, I'll add such a test.