Francois Gouget : comctl32: Fix lstrncmpiW() so its return value is standard and use the CSTR_XXX macros.
Module: wine Branch: master Commit: bede13b335566a5aaf5c8ebf2f48a691068b25f7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bede13b335566a5aaf5c8ebf2f... Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Jun 20 00:53:56 2012 +0200 comctl32: Fix lstrncmpiW() so its return value is standard and use the CSTR_XXX macros. --- dlls/comctl32/listview.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 27b2fd0..e1b9a71 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -559,11 +559,8 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW) static inline int lstrncmpiW(LPCWSTR s1, LPCWSTR s2, int n) { - int res; - n = min(min(n, lstrlenW(s1)), lstrlenW(s2)); - res = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n); - return res ? res - sizeof(WCHAR) : res; + return CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n) - CSTR_EQUAL; } /******** Debugging functions *****************************************/
participants (1)
-
Alexandre Julliard