From: RĂ©mi Denis-Courmont Date: Sat, 10 Jan 2009 13:06:21 +0000 (+0200) Subject: We don't need MB2WC when converting ASCII X-Git-Tag: 1.0.0-pre1~1435 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=50866663cd6e8fae6917ac6de10c1c4cd232c37d;p=vlc We don't need MB2WC when converting ASCII --- diff --git a/src/modules/os.c b/src/modules/os.c index a34540bb94..ca0e214150 100644 --- a/src/modules/os.c +++ b/src/modules/os.c @@ -321,10 +321,13 @@ static void *module_Lookup( module_handle_t handle, const char *psz_function ) } #elif defined(HAVE_DL_WINDOWS) && defined(UNDER_CE) - wchar_t psz_real[256]; - MultiByteToWideChar( CP_ACP, 0, psz_function, -1, psz_real, 256 ); + wchar_t wide[sizeof( psz_function ) + 1]; + size_t i; + do + wide[i] = psz_function[i]; /* UTF-16 <- ASCII */ + while( psz_function[i++] ); - return (void *)GetProcAddress( handle, psz_real ); + return (void *)GetProcAddress( handle, wide ); #elif defined(HAVE_DL_WINDOWS) && defined(WIN32) return (void *)GetProcAddress( handle, (char *)psz_function );