From d7ca745d9e23f2d56f9a151919309656750b5035 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 17 Dec 2009 15:41:57 -0600 Subject: [PATCH] ole32: Compare upper character values directly in entryNameCmp. The sort function used by native is not entirely consistent with lstrcmpiW, even on Windows. This one better matches the behavior I've observed so far. --- dlls/ole32/storage32.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 2a7e9f0..7d267b6 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1350,12 +1350,12 @@ static LONG entryNameCmp( { LONG diff = lstrlenW(name1) - lstrlenW(name2); - if (diff == 0) + while (diff == 0 && *name1 != 0) { /* * We compare the string themselves only when they are of the same length */ - diff = lstrcmpiW( name1, name2); + diff = toupperW(*name1++) - toupperW(*name2++); } return diff; -- 1.6.3.3