# HG changeset patch # User Sam Lantinga # Date 1241697831 0 # Node ID 2dc6c9f343c85b7fda6225c79d459b56437b4d84 # Parent 04a75cf3ff1cd4d42e0c0649b6856596690dae3a Fixed dynamic loading on Windows CE diff -r 04a75cf3ff1c -r 2dc6c9f343c8 src/loadso/win32/SDL_sysloadso.c --- a/src/loadso/win32/SDL_sysloadso.c Mon Apr 27 10:33:21 2009 +0000 +++ b/src/loadso/win32/SDL_sysloadso.c Thu May 07 12:03:51 2009 +0000 @@ -93,7 +93,7 @@ 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 ) {