- Don't loop indefintely in RtlFindUnicodePrefix if the splaylinks have changed insid...
authorAlex Ionescu <aionescu@gmail.com>
Tue, 8 Nov 2005 17:14:19 +0000 (17:14 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 8 Nov 2005 17:14:19 +0000 (17:14 +0000)
svn path=/trunk/; revision=19058

reactos/lib/rtl/unicodeprefix.c

index f8851ae..bed8483 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <rtl.h>
 
 
 #include <rtl.h>
 
-#define NDEBUG
+//#define NDEBUG
 #include <debug.h>
 
 /*
 #include <debug.h>
 
 /*
@@ -179,7 +179,8 @@ RtlFindUnicodePrefix(PUNICODE_PREFIX_TABLE PrefixTable,
         DPRINT("CurrentEntry->NameLength %lx\n", CurrentEntry->NameLength);
 
         /* Get the splay links and loop */
         DPRINT("CurrentEntry->NameLength %lx\n", CurrentEntry->NameLength);
 
         /* Get the splay links and loop */
-        while ((SplayLinks = &CurrentEntry->Links))
+        SplayLinks = &CurrentEntry->Links;
+        while (SplayLinks)
         {
             /* Get the entry */
             DPRINT("SplayLinks %p\n", SplayLinks);
         {
             /* Get the entry */
             DPRINT("SplayLinks %p\n", SplayLinks);