Module: wine Branch: refs/heads/master Commit: ca6fd0d4eceae51f816457f425111a811d6ef057 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ca6fd0d4eceae51f816457f4...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Feb 16 20:03:06 2006 +0100
libwine: Only use the library directory if it's an absolute path.
---
libs/wine/config.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/wine/config.c b/libs/wine/config.c index 33aa87a..7b4c969 100644 --- a/libs/wine/config.c +++ b/libs/wine/config.c @@ -139,10 +139,10 @@ static const char *get_runtime_libdir(vo
#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 );