Vincent Povirk : ole32: Compare upper character values directly in entryNameCmp.

Alexandre Julliard julliard at winehq.org
Fri Dec 18 10:49:08 CST 2009


Module: wine
Branch: master
Commit: 5d9fd1b716ce497ca072765a771e4fc6c3bc11f0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5d9fd1b716ce497ca072765a771e4fc6c3bc11f0

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Thu Dec 17 15:41:57 2009 -0600

ole32: Compare upper character values directly in entryNameCmp.

The sort function used by native is not entirely consistent with lstrcmpiW,
even on Windows.

---

 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;




More information about the wine-cvs mailing list