From 99192cfe6832a252bc6e69614a599ddfdcebc574 Mon Sep 17 00:00:00 2001 From: Xiaoqiang Wang Date: Wed, 13 May 2020 20:29:27 +0200 Subject: [PATCH] dll basename starts after \ --- require.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/require.c b/require.c index 1a5c49d..a4e6358 100644 --- a/require.c +++ b/require.c @@ -780,7 +780,7 @@ static void registerExternalModules() if (!GetModuleFileName(hMods[i], name, MAX_PATH)) continue; /* no library name */ name[sizeof(name)-1] = 0; /* WinXP may not terminate the string */ p = strrchr(name, '\\'); /* find file name part in "/.dll" */ - if (p) { location = name; } else p=name; /* find end of "\\" (if exists) */ + if (p) { location = name; p++; } else p=name; /* find end of "\\" (if exists) */ symname = p; p = strchr(symname, '.'); /* find ".dll" */ if (p == NULL) p = symname + strlen(symname); /* no file extension ? */