diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp index 34ca4198..09884648 100644 --- a/Source/Plugins.cpp +++ b/Source/Plugins.cpp @@ -51,7 +51,7 @@ void Plugins::FindCommands(char* path,bool displayInfo) } } -void Plugins::GetExports(char* pathToDll,bool displayInfo) +void Plugins::GetExports(char* pathToDll, bool displayInfo) { if (pathToDll) { @@ -64,8 +64,18 @@ void Plugins::GetExports(char* pathToDll,bool displayInfo) dllName[0] = 0; char* ptr = strrchr(pathToDll,'\\'); if (ptr && *ptr && *(ptr+1)) strcpy(dllName,ptr+1); - ptr = strstr(dllName, ".dll"); - if (ptr) *ptr = 0; + + // find .dll + char *dllName2 = strdup(dllName); + for (ptr = dllName2; *ptr; ptr = CharNext(ptr)) + { + if (!strcmpi(ptr, ".dll")) + { + *(dllName + (ptr - dllName2)) = 0; + break; + } + } + free(dllName2); FILE* dll = fopen(pathToDll,"rb"); if (dll) diff --git a/Source/script.cpp b/Source/script.cpp index ed156b31..478bcb5a 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3442,8 +3442,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) char b[255]; for (unsigned int spos=0; (spos <= strlen(s)) && (spos <= 255); spos++) b[spos]=toupper(*(s+spos)); - strcpy(s,b); - + strcpy(s,b); + if (*s) { int c=0;