summaryrefslogtreecommitdiff
path: root/src/libw32dll/wine/module.c
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2006-06-11 15:09:47 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2006-06-11 15:09:47 +0000
commitba717771e1356acbc7c4c35cb2828098a5a31675 (patch)
tree7e45bca28965eb0b52b238116b1e124bf834be1b /src/libw32dll/wine/module.c
parente07d8ace636273c3b848c5dc6bdec6b86c3b3270 (diff)
downloadxine-lib-ba717771e1356acbc7c4c35cb2828098a5a31675.tar.gz
xine-lib-ba717771e1356acbc7c4c35cb2828098a5a31675.tar.bz2
Re-commit lost change: Fix the freeze on QuickTime files when configured with non-existing win32 codecs path. win32.c have known nothing about all paths tested in module.c.
CVS patchset: 8033 CVS date: 2006/06/11 15:09:47
Diffstat (limited to 'src/libw32dll/wine/module.c')
-rw-r--r--src/libw32dll/wine/module.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/libw32dll/wine/module.c b/src/libw32dll/wine/module.c
index bc943d0d6..6e9235584 100644
--- a/src/libw32dll/wine/module.c
+++ b/src/libw32dll/wine/module.c
@@ -363,7 +363,6 @@ static WIN_BOOL MODULE_FreeLibrary( WINE_MODREF *wm )
HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
{
WINE_MODREF *wm = 0;
- char* listpath[] = { "", "", "/usr/lib/codecs", "/usr/local/lib/codecs", "/usr/lib/win32", "/usr/local/lib/win32", 0 };
char path[512];
char checked[2000];
int i = -1;
@@ -381,31 +380,19 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
// if(fs_installed==0)
// install_fs();
- while (wm == 0 && listpath[++i])
+ for (i = 0; !wm && (i < 2); i++)
{
memset (&path, 0, sizeof (path));
- if (i < 2)
- {
- if (i == 0)
- /* check just original file name */
- strncpy(path, libname, 511);
- else
- /* check default user path */
- strncpy(path, win32_def_path, 300);
- }
- else if (strcmp(win32_def_path, listpath[i]))
- /* path from the list */
- strncpy(path, listpath[i], 300);
- else
- continue;
-
- if (i > 0)
- {
- strcat(path, "/");
- strncat(path, libname, 100);
+ if (i == 0) {
+ /* check just original file name */
+ strncpy(path, libname, sizeof(path) - 1);
+ } else {
+ /* check default user path */
+ strncpy(path, win32_def_path, sizeof(path) - 2);
+ strcat(path, "/");
+ strncat(path, libname, sizeof(path) - strlen(libname));
}
- path[511] = 0;
wm = MODULE_LoadLibraryExA( path, hfile, flags );
if (!wm)