From 688221460b6a3ce10694d108f4dc75a8ce3e22e5 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 19 Feb 1999 15:35:23 +0000 Subject: [PATCH] Only append .dll if no extension yet. --- loader/ne/module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loader/ne/module.c b/loader/ne/module.c index 0ab40039cb3..c68c784a1ea 100644 --- a/loader/ne/module.c +++ b/loader/ne/module.c @@ -697,7 +697,10 @@ static BOOL32 NE_LoadDLLs( NE_MODULE *pModule ) char buffer[260]; BYTE *pstr = (BYTE *)pModule + pModule->import_table + *pModRef; memcpy( buffer, pstr + 1, *pstr ); - strcpy( buffer + *pstr, ".dll" ); + *(buffer + *pstr) = 0; /* terminate it */ + if (!strchr(buffer,'.')) /* only append .dll if no extension yet. + handles a request for krnl386.exe*/ + strcpy( buffer + *pstr, ".dll" ); TRACE(module, "Loading '%s'\n", buffer ); if (!(*pModRef = GetModuleHandle16( buffer ))) {