summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-06-23 18:15:23 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-06-23 18:15:23 +0000
commitba7e4437aa27a0775f31400cfe7bcaf273e14ef3 (patch)
tree9dd37616d934a5c958ddd16501d691dc025bf90a /win32/win32.c
parent4e61ee4d2394e4b120037f733150ee6041bf95f2 (diff)
parent9666903d92ab8cdd420a0bc714d5c94ce051cb2c (diff)
downloadperl-ba7e4437aa27a0775f31400cfe7bcaf273e14ef3.tar.gz
Integrate mainline c. 5.004_68 into ansiperl, mainly
so see what has changed... p4raw-id: //depot/ansiperl@1208
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 9afb0bd687..68b6bb8962 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -202,7 +202,9 @@ get_emd_part(char *prev_path, char *trailing_path, ...)
va_start(ap, trailing_path);
strip = va_arg(ap, char *);
- GetModuleFileName(GetModuleHandle(NULL), mod_name, sizeof(mod_name));
+ GetModuleFileName((w32_perldll_handle == INVALID_HANDLE_VALUE)
+ ? GetModuleHandle(NULL)
+ : w32_perldll_handle, mod_name, sizeof(mod_name));
ptr = strrchr(mod_name, '\\');
while (ptr && strip) {
/* look for directories to skip back */