From 09fa2c188befe5bbbb014132bd77fa313e48a0a7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 25 Jan 2004 08:32:49 +0000 Subject: [PATCH] Fixed binary search algroithm in LdrGetExportByOrdinal - numbers can reach negative values. svn path=/trunk/; revision=7870 --- reactos/lib/ntdll/ldr/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/lib/ntdll/ldr/utils.c b/reactos/lib/ntdll/ldr/utils.c index eb04f5a5140..1d94e06d84f 100644 --- a/reactos/lib/ntdll/ldr/utils.c +++ b/reactos/lib/ntdll/ldr/utils.c @@ -1,4 +1,4 @@ -/* $Id: utils.c,v 1.79 2004/01/24 23:44:26 navaraf Exp $ +/* $Id: utils.c,v 1.80 2004/01/25 08:32:49 navaraf Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1056,7 +1056,7 @@ LdrGetExportByName(PVOID BaseAddress, PVOID ExName; ULONG Ordinal; PVOID Function; - ULONG minn, maxn; + LONG minn, maxn; ULONG ExportDirSize; DPRINT("LdrGetExportByName %x %s %hu\n", BaseAddress, SymbolName, Hint); @@ -1123,7 +1123,7 @@ LdrGetExportByName(PVOID BaseAddress, maxn = ExportDir->NumberOfNames - 1; while (minn <= maxn) { - ULONG mid; + LONG mid; LONG res; mid = (minn + maxn) / 2;