diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-06 13:26:18 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-07-06 13:26:18 +0200 |
commit | 5604986bf37b131397d3f168e7eac6a22292b2ea (patch) | |
tree | 67250db5b94faae96af6d6be78c3dcc55b7bd3bd /proto-wine/opentrack-wrapper-wine-windows.cxx | |
parent | 0d42cba7e4871d2f099fd93e757556a0502d6714 (diff) |
proto-wine: fix .dll path after hier(7) support
Diffstat (limited to 'proto-wine/opentrack-wrapper-wine-windows.cxx')
-rw-r--r-- | proto-wine/opentrack-wrapper-wine-windows.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/proto-wine/opentrack-wrapper-wine-windows.cxx b/proto-wine/opentrack-wrapper-wine-windows.cxx index 19ee8ffd..6604c626 100644 --- a/proto-wine/opentrack-wrapper-wine-windows.cxx +++ b/proto-wine/opentrack-wrapper-wine-windows.cxx @@ -6,10 +6,15 @@ #include "opentrack-compat/shm.h" #include "opentrack-compat/shm.cpp" #include "wine-shm.h" +#include "opentrack-library-path.h" +#include <cstring> + +using std::strcat; static void write_path(const char* key, const char* subkey) { char dir[8192]; + dir[sizeof(dir)-1] = '\0'; if (GetCurrentDirectoryA(8192, dir) < 8190) { @@ -27,7 +32,9 @@ static void write_path(const char* key, const char* subkey) for (int i = 0; dir[i]; i++) if (dir[i] == '\\') dir[i] = '/'; - strcat(dir, "/"); + // there's always a leading and trailing slash + strcat(dir, OPENTRACK_LIBRARY_PATH); + //strcat(dir, "/"); (void) RegSetValueExA(hkpath, subkey, 0, REG_SZ, (BYTE*) dir, strlen(dir) + 1); RegCloseKey(hkpath); } |