ntdll: Keep unwind table entry count instead of a size.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-01-23 08:23:49 +03:00 committed by Alexandre Julliard
parent 6f7731819c
commit 0cd5a68ca4
1 changed files with 16 additions and 16 deletions

View File

@ -342,7 +342,7 @@ struct dynamic_unwind_entry
/* lookup table */
RUNTIME_FUNCTION *table;
DWORD table_size;
DWORD count;
/* user defined callback */
PGET_RUNTIME_FUNCTION_CALLBACK callback;
@ -2516,7 +2516,7 @@ static RUNTIME_FUNCTION *find_function_info( ULONG64 pc, HMODULE module,
RUNTIME_FUNCTION *func, ULONG size )
{
int min = 0;
int max = size/sizeof(*func) - 1;
int max = size - 1;
while (min <= max)
{
@ -2551,7 +2551,7 @@ static RUNTIME_FUNCTION *lookup_function_info( ULONG64 pc, ULONG64 *base, LDR_MO
IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size )))
{
/* lookup in function table */
func = find_function_info( pc, (*module)->BaseAddress, func, size );
func = find_function_info( pc, (*module)->BaseAddress, func, size/sizeof(*func) );
}
}
else
@ -2569,7 +2569,7 @@ static RUNTIME_FUNCTION *lookup_function_info( ULONG64 pc, ULONG64 *base, LDR_MO
if (entry->callback)
func = entry->callback( pc, entry->context );
else
func = find_function_info( pc, (HMODULE)entry->base, entry->table, entry->table_size );
func = find_function_info( pc, (HMODULE)entry->base, entry->table, entry->count );
break;
}
}
@ -3459,7 +3459,7 @@ BOOLEAN CDECL RtlAddFunctionTable( RUNTIME_FUNCTION *table, DWORD count, DWORD64
entry->base = addr;
entry->end = addr + table[count - 1].EndAddress;
entry->table = table;
entry->table_size = count * sizeof(RUNTIME_FUNCTION);
entry->count = count;
entry->callback = NULL;
entry->context = NULL;
@ -3494,7 +3494,7 @@ BOOLEAN CDECL RtlInstallFunctionTableCallback( DWORD64 table, DWORD64 base, DWOR
entry->base = base;
entry->end = base + length;
entry->table = (RUNTIME_FUNCTION *)table;
entry->table_size = 0;
entry->count = 0;
entry->callback = callback;
entry->context = context;