From b800b69f348ab07b42550e8f92c95a8177014448 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Fri, 17 Apr 2009 07:15:04 +0000 Subject: [PATCH] - More correct fix of a problem with loading dlls svn path=/trunk/; revision=40556 --- reactos/dll/ntdll/ldr/utils.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/reactos/dll/ntdll/ldr/utils.c b/reactos/dll/ntdll/ldr/utils.c index c7e161505b1..14b7f38a5be 100644 --- a/reactos/dll/ntdll/ldr/utils.c +++ b/reactos/dll/ntdll/ldr/utils.c @@ -858,7 +858,6 @@ LdrFindEntryForName(PUNICODE_STRING Name, PLDR_DATA_TABLE_ENTRY ModulePtr; BOOLEAN ContainsPath; UNICODE_STRING AdjustedName; - unsigned i; DPRINT("LdrFindEntryForName(Name %wZ)\n", Name); @@ -882,14 +881,8 @@ LdrFindEntryForName(PUNICODE_STRING Name, return(STATUS_SUCCESS); } - LdrAdjustDllName (&AdjustedName, Name, TRUE); - - ContainsPath = (AdjustedName.Length >= 2 * sizeof(WCHAR) && L':' == AdjustedName.Buffer[1]); - for (i = 0; ! ContainsPath && i < AdjustedName.Length / sizeof(WCHAR); i++) - { - ContainsPath = L'\\' == AdjustedName.Buffer[i] || - L'/' == AdjustedName.Buffer[i]; - } + ContainsPath = (Name->Length >= 2 * sizeof(WCHAR) && L':' == Name->Buffer[1]); + LdrAdjustDllName (&AdjustedName, Name, !ContainsPath); if (LdrpLastModule) {