diff options
author | 2010-07-28 11:51:41 +0200 | |
---|---|---|
committer | 2010-07-28 11:51:41 +0200 | |
commit | 4fc8d5ead565c1b4e45eac93fba26ddb3b8566b4 (patch) | |
tree | 0c6eed66f2aca1755f9a218f5ff8967acf1cc8bc /plugins/ao/eng_ssf/eng_ssf.c | |
parent | 514156edddceaa3fad523c2d46bc9ac1e00b6624 (diff) | |
parent | bfce294151a589c1d91d982d78eba47d16158713 (diff) |
Merge branch 'devel' into actions
Conflicts:
plugins/hotkeys/hotkeys.c
Diffstat (limited to 'plugins/ao/eng_ssf/eng_ssf.c')
-rw-r--r-- | plugins/ao/eng_ssf/eng_ssf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/ao/eng_ssf/eng_ssf.c b/plugins/ao/eng_ssf/eng_ssf.c index 0d81a665..18ba0e42 100644 --- a/plugins/ao/eng_ssf/eng_ssf.c +++ b/plugins/ao/eng_ssf/eng_ssf.c @@ -120,6 +120,20 @@ void *ssf_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, libfile); + } + else { + strcpy (libpath, libfile); + } #if DEBUG_LOADER printf("Loading library: %s\n", c->lib); #endif |