Skip to content

Commit

Permalink
DosLoadModule("x.dll") wants to find X.DLL in the libpath, like a mod…
Browse files Browse the repository at this point in the history
…ule name.

(I think.)
  • Loading branch information
icculus committed Jan 20, 2018
1 parent 612773c commit 2e7657a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lx_loader.c
Expand Up @@ -2018,9 +2018,16 @@ static LxModule *loadLxModuleByModuleName(const char *modname)
static LxModule *loadLxModuleByPathOrModuleName(const char *modname)
{
LxModule *retval = NULL;
// !!! FIXME: can a module name be specified as "NAME.DLL" and not be considered a filename?
if (strrchr(modname, '.') == NULL) {
retval = loadLxModuleByModuleName(modname);
if (!strchr(modname, '/') && !strchr(modname, '\\')) {
char *str = (char *) alloca(strlen(modname) + 1);
if (str) {
strcpy(str, modname);
char *ptr = strrchr(str, '.');
if (ptr) {
*ptr = '\0';
}
retval = loadLxModuleByModuleName(str);
} // if
} else {
uint32 err = 0;
char *path = makeUnixPath(modname, &err);
Expand Down

0 comments on commit 2e7657a

Please sign in to comment.