dlerror() returns NULL when no errors have occurred since the last call
to dlerror() (or since the last call to dlopen(), dlsym() or dlclose()).
This commit is contained in:
Aleric Inglewood
2012-09-05 02:15:41 +02:00
parent 15cce79040
commit a8f5bf8baf

View File

@@ -125,7 +125,7 @@ int LLPluginInstance::load(const std::string& plugin_dir, std::string &plugin_fi
buf[0] = 0;
if (error)
{
strncpy(buf, dlerror(), sizeof(buf));
strncpy(buf, error, sizeof(buf));
}
buf[sizeof(buf) - 1] = 0;
}