Fixed dynamic loading on Windows CE

This commit is contained in:
Sam Lantinga
2009-05-07 12:04:53 +00:00
parent fb58f10acf
commit 78c6fc38ac

View File

@@ -96,7 +96,7 @@ SDL_LoadFunction(void *handle, const char *name)
wchar_t *name_t = SDL_malloc((length + 1) * 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);
if (symbol == NULL) {