Skip to content

Commit 654a482

Browse files
committed
linux 3
1 parent f3e1b6a commit 654a482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

QtLxBTSC/plugin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include "plugin.h"
1414
#include "PluginHelper.h"
15-
//#include <iostream>
16-
//#include <cassert>
1715

1816
#define PLUGIN_API_VERSION 22
1917
#define PATH_BUFSIZE 512
@@ -86,7 +84,9 @@ void ts3plugin_shutdown() {
8684
*/
8785

8886
void ts3plugin_registerPluginID(const char* id) {
89-
pluginID = _strdup(id);
87+
int len = strlen(id);
88+
pluginID = static_cast<char*>(malloc(len + 1));
89+
memcpy(pluginID, id, len + 1);
9090
}
9191

9292
/* Plugin command keyword. Return NULL or "" if not used. */

0 commit comments

Comments
 (0)