* win32-nat.c (register_loaded_dll): Correctly check for invalid handle value.

This commit is contained in:
Christopher Faylor 2002-02-21 06:44:05 +00:00
parent c914e0cc47
commit 097f6b0bba
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-02-21 Christopher Faylor <cgf@redhat.com>
* win32-nat.c (register_loaded_dll): Correctly check for invalid handle
value.
2002-02-20 Christopher Faylor <cgf@redhat.com>
* win32-nat.c (register_loaded_dll): Handle case where FindFirstFile

View File

@ -582,7 +582,7 @@ register_loaded_dll (const char *name, DWORD load_addr)
HANDLE h = FindFirstFile(name, &w32_fd);
size_t len;
if (h)
if (h != INVALID_HANDLE_VALUE)
{
FindClose (h);
strcpy (buf, name);

View File

@ -582,7 +582,7 @@ register_loaded_dll (const char *name, DWORD load_addr)
HANDLE h = FindFirstFile(name, &w32_fd);
size_t len;
if (h)
if (h != INVALID_HANDLE_VALUE)
{
FindClose (h);
strcpy (buf, name);