From 9c6735e6a27c79f162c0a95427e564ae5ccef008 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 1 Apr 1999 10:09:46 +0000 Subject: [PATCH] "foo" was not translated to "foo.so" in elf loader. --- loader/elf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/loader/elf.c b/loader/elf.c index 853ae064da3..c2b1fb4ca86 100644 --- a/loader/elf.c +++ b/loader/elf.c @@ -120,12 +120,16 @@ HMODULE ELF_LoadLibraryExA( LPCSTR libname, HANDLE hf, DWORD flags ) x = t+strlen(t); strcat(t,s); s = strchr(x,'.'); - while (s) { + if (s) { + while (s) { if (!strcasecmp(s,".dll")) { - strcpy(s+1,UNIX_DLL_ENDING); - break; + strcpy(s+1,UNIX_DLL_ENDING); + break; } s=strchr(s+1,'.'); + } + } else { + strcat(x,"."UNIX_DLL_ENDING); } /* FIXME: make UNIX filename from DOS fn? */