diff --git a/GUI/extensions.cpp b/GUI/extensions.cpp index 54b5e95..4fb6b64 100644 --- a/GUI/extensions.cpp +++ b/GUI/extensions.cpp @@ -18,9 +18,10 @@ std::map LoadExtensions() int extensionNumber = file.split("_")[0].toInt(); newExtensions[extensionNumber] = (ExtensionFunction)GetProcAddress(GetModuleHandleW(file.toStdWString().c_str()), "OnNewSentence"); file.chop(sizeof("dll")); - extensionNames[extensionNumber] = file.split("_")[1]; + file.remove(0, file.indexOf("_") + 1); + extensionNames[extensionNumber] = file; } - std::shared_lock extenLock(extenMutex); + std::unique_lock extenLock(extenMutex); extensions = newExtensions; return extensionNames; }