Skip to content

Commit

Permalink
Win32 dladdr() wasn't returning 0 in all failures
Browse files Browse the repository at this point in the history
  • Loading branch information
nicowilliams committed Feb 4, 2014
1 parent 2fd4c58 commit fdabfd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/roken/dlfcn_w32.c
Expand Up @@ -175,7 +175,7 @@ dladdr(void *addr, Dl_info *dli)
if (!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
(LPCTSTR)(ULONG_PTR)addr, &hm))
return -1;
return 0;

nsize = GetModuleFileName(hm, dli->_dli_buf, sizeof(dli->_dli_buf));
dli->_dli_buf[sizeof(dli->_dli_buf) - 1] = '\0';
Expand Down

0 comments on commit fdabfd6

Please sign in to comment.