Only try to append ".dll" if a library is loaded implicitely.

This commit is contained in:
Bertho Stultiens 1999-05-02 09:21:31 +00:00 committed by Alexandre Julliard
parent edda358400
commit 014855850e

View file

@ -849,11 +849,13 @@ HINSTANCE16 NE_LoadModule( LPCSTR name, BOOL implicit )
{
char buffer[260];
/* 4 == strlen(".dll") */
strncpy(buffer, name, sizeof(buffer) - 1 - 4);
strcat(buffer, ".dll");
if ((hFile = OpenFile16( buffer, &ofs, OF_READ )) == HFILE_ERROR16) {
return 2; /* File not found */
if(implicit)
{
/* 4 == strlen(".dll") */
strncpy(buffer, name, sizeof(buffer) - 1 - 4);
strcat(buffer, ".dll");
if ((hFile = OpenFile16( buffer, &ofs, OF_READ )) == HFILE_ERROR16)
return 2; /* File not found */
}
}