libwine: Only use the library directory if it's an absolute path.
This commit is contained in:
parent
3c3a7724fc
commit
ca6fd0d4ec
|
@ -139,10 +139,10 @@ static const char *get_runtime_libdir(void)
|
|||
|
||||
#ifdef HAVE_DLADDR
|
||||
Dl_info info;
|
||||
char *p;
|
||||
|
||||
if (!libdir && dladdr( get_runtime_libdir, &info ) && (p = strrchr( info.dli_fname, '/' )))
|
||||
if (!libdir && dladdr( get_runtime_libdir, &info ) && info.dli_fname[0] == '/')
|
||||
{
|
||||
const char *p = strrchr( info.dli_fname, '/' );
|
||||
unsigned int len = p - info.dli_fname;
|
||||
if (!len) len++; /* include initial slash */
|
||||
libdir = xmalloc( len + 1 );
|
||||
|
|
Loading…
Reference in New Issue