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
1 changed files with 7 additions and 5 deletions

View File

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