Commit 01485585 authored by Bertho Stultiens's avatar Bertho Stultiens Committed by Alexandre Julliard

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

parent edda3584
......@@ -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 */
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment