Fix sizeof misuse and variable uninitialization
authorPierre Ynard <linkfanel@yahoo.fr>
Tue, 13 Jan 2009 14:14:22 +0000 (15:14 +0100)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 13 Jan 2009 17:33:01 +0000 (19:33 +0200)
Unbreaks start-up on WinCE.

Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
src/modules/os.c

index ca0e214..d1d8384 100644 (file)
@@ -321,8 +321,8 @@ static void *module_Lookup( module_handle_t handle, const char *psz_function )
     }
 
 #elif defined(HAVE_DL_WINDOWS) && defined(UNDER_CE)
-    wchar_t wide[sizeof( psz_function ) + 1];
-    size_t i;
+    wchar_t wide[strlen( psz_function ) + 1];
+    size_t i = 0;
     do
         wide[i] = psz_function[i]; /* UTF-16 <- ASCII */
     while( psz_function[i++] );