CVS: winex/loader module.c,1.30,1.31

[email protected] 31 Jul 2007 19:30:22 -0000
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/loader module.c,1.30,1.31Update of /var/lib/cvsd/cvsroot/winex/loader
In directory agravaine:/tmp/cvs-serv30484/loader

Modified Files:
	module.c 
Log Message:

- fix MODULE_FindModule change to not magically find non-existant modules



Index: module.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/loader/module.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- module.c	31 Jul 2007 18:10:10 -0000	1.30
+++ module.c	31 Jul 2007 19:30:20 -0000	1.31
@@ -537,6 +537,7 @@
     if (!(p = strrchr( dllname, '.')) || strchr( p, '/' ) || strchr( p, '\\'))
             strcat( dllname, ".DLL" );
  
+    shortdllname[0] = '\0';
     GetShortPathNameA(dllname, shortdllname, MAX_PATH);
 
     for ( wm = MODULE_modref_list; wm; wm = wm->next )
@@ -549,7 +550,8 @@
             break;
         if ( !FILE_strcasecmp( dllname, wm->short_filename ) )
             break;
-        if ( !FILE_strcasecmp( shortdllname, wm->short_filename ) )
+        if ( *shortdllname &&
+             !FILE_strcasecmp( shortdllname, wm->short_filename ) )
             break;
     }