Commit aaf1b51f authored by Sam Lantinga's avatar Sam Lantinga

Fixed dynamic loading on Windows CE

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403599
parent 881a4d07
...@@ -93,7 +93,7 @@ void *SDL_LoadFunction(void *handle, const char *name) ...@@ -93,7 +93,7 @@ void *SDL_LoadFunction(void *handle, const char *name)
wchar_t *name_t = SDL_malloc((length + 1) * sizeof(wchar_t)); wchar_t *name_t = SDL_malloc((length + 1) * sizeof(wchar_t));
wchar_t *errbuf_t = SDL_malloc(512 * sizeof(wchar_t)); wchar_t *errbuf_t = SDL_malloc(512 * sizeof(wchar_t));
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length); MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length+1);
symbol = (void *)GetProcAddress((HMODULE)handle, name_t); symbol = (void *)GetProcAddress((HMODULE)handle, name_t);
if ( symbol == NULL ) { if ( symbol == NULL ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment