libwine: Only use the library directory if it's an absolute path.

This commit is contained in:
Alexandre Julliard 2006-02-16 20:03:06 +01:00
parent 3c3a7724fc
commit ca6fd0d4ec
1 changed files with 2 additions and 2 deletions

View File

@ -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 );