diff options
Diffstat (limited to 'plugins/ao/eng_psf/eng_psf2.c')
-rw-r--r-- | plugins/ao/eng_psf/eng_psf2.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/plugins/ao/eng_psf/eng_psf2.c b/plugins/ao/eng_psf/eng_psf2.c index de9e5148..525ad3f7 100644 --- a/plugins/ao/eng_psf/eng_psf2.c +++ b/plugins/ao/eng_psf/eng_psf2.c @@ -497,19 +497,7 @@ void *psf2_start(const char *path, uint8 *buffer, uint32 length) { uint64 tmp_length; char libpath[PATH_MAX]; - const char *e = path + strlen(path); - while (e > path && *e != '/') { - e--; - } - if (*e == '/') { - e++; - memcpy (libpath, path, e-path); - libpath[e-path] = 0; - strcat (libpath, s->c->lib); - } - else { - strcpy (libpath, s->c->lib); - } + ao_getlibpath (path, s->c->lib, libpath, sizeof (libpath)); #if DEBUG_LOADER printf("Loading library: %s\n", s->c->lib); |