Don't store address of local variable in hashtable.

2001-02-10  Tor Lillqvist  <tml@iki.fi>

	* gwin32.c (get_package_directory_from_module): Don't store
	address of local variable in hashtable.
This commit is contained in:
Tor Lillqvist 2001-02-10 00:17:06 +00:00 committed by Tor Lillqvist
parent 41de921c50
commit bf8cdc4655
10 changed files with 46 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -1,3 +1,8 @@
2001-02-10 Tor Lillqvist <tml@iki.fi>
* gwin32.c (get_package_directory_from_module): Don't store
address of local variable in hashtable.
2001-02-08 Fatih Demir <kabalak@kabalak.net> 2001-02-08 Fatih Demir <kabalak@kabalak.net>
* configure.in: Added "tr" to ALL_LINGUAS. * configure.in: Added "tr" to ALL_LINGUAS.

View File

@ -850,7 +850,7 @@ get_package_directory_from_module (gchar *module_name)
{ {
static GHashTable *module_dirs = NULL; static GHashTable *module_dirs = NULL;
HMODULE hmodule = NULL; HMODULE hmodule = NULL;
gchar fn[MAX_PATH]; gchar *fn;
gchar *p; gchar *p;
gchar *result; gchar *result;
@ -869,7 +869,8 @@ get_package_directory_from_module (gchar *module_name)
return NULL; return NULL;
} }
if (!GetModuleFileName (hmodule, fn, sizeof (fn))) fn = g_malloc (MAX_PATH);
if (!GetModuleFileName (hmodule, fn, MAX_PATH))
return NULL; return NULL;
if ((p = strrchr (fn, '\\')) != NULL) if ((p = strrchr (fn, '\\')) != NULL)

View File

@ -850,7 +850,7 @@ get_package_directory_from_module (gchar *module_name)
{ {
static GHashTable *module_dirs = NULL; static GHashTable *module_dirs = NULL;
HMODULE hmodule = NULL; HMODULE hmodule = NULL;
gchar fn[MAX_PATH]; gchar *fn;
gchar *p; gchar *p;
gchar *result; gchar *result;
@ -869,7 +869,8 @@ get_package_directory_from_module (gchar *module_name)
return NULL; return NULL;
} }
if (!GetModuleFileName (hmodule, fn, sizeof (fn))) fn = g_malloc (MAX_PATH);
if (!GetModuleFileName (hmodule, fn, MAX_PATH))
return NULL; return NULL;
if ((p = strrchr (fn, '\\')) != NULL) if ((p = strrchr (fn, '\\')) != NULL)