- Fix a bug spotted in RtlInsertUnicodePrefix's loop.
Modified: trunk/reactos/lib/rtl/unicodeprefix.c

Modified: trunk/reactos/lib/rtl/unicodeprefix.c
--- trunk/reactos/lib/rtl/unicodeprefix.c	2005-11-08 00:19:01 UTC (rev 19051)
+++ trunk/reactos/lib/rtl/unicodeprefix.c	2005-11-08 00:21:29 UTC (rev 19052)
@@ -167,18 +167,7 @@
         /* Get the splay links and loop */
         while ((SplayLinks = &CurrentEntry->Links))
         {
-            /*
-             * Implementation notes:
-             *  - get the entry
-             *  - compare the entry's prefix with the fullname:
-             *    if greater: restart on the left child
-             *    if lesser: restart on the right child
-             *  - else if equal:
-             *    for caseinsensitive, just return the entry and
-             *        splay it and set it as root if it's a child
-             *    for casesensitive, loop the circular case match list and
-             *        keep comparing for each entry
-             */
+            /* Get the entry */
             Entry = CONTAINING_RECORD(SplayLinks,
                                       UNICODE_PREFIX_TABLE_ENTRY,
                                       Links);
@@ -374,8 +363,11 @@
             /* Insert it into the circular list */
             PrefixTableEntry->CaseMatch = Entry->CaseMatch;
             Entry->CaseMatch = PrefixTableEntry;
+            break;
         }
-        else if (Result == GenericGreaterThan)
+
+        /* Check if the result was greater or lesser than */
+        if (Result == GenericGreaterThan)
         {
             /* Check out if we have a left child */
             if (RtlLeftChild(&Entry->Links))