src/loadso/win32/SDL_sysloadso.c
branchSDL-1.2
changeset 4178 2dc6c9f343c8
parent 4159 a1b03ba2fcd0
child 6137 4720145f848b
     1.1 --- a/src/loadso/win32/SDL_sysloadso.c	Mon Apr 27 10:33:21 2009 +0000
     1.2 +++ b/src/loadso/win32/SDL_sysloadso.c	Thu May 07 12:03:51 2009 +0000
     1.3 @@ -93,7 +93,7 @@
     1.4  	wchar_t *name_t = SDL_malloc((length + 1) * sizeof(wchar_t));
     1.5  	wchar_t *errbuf_t = SDL_malloc(512 * sizeof(wchar_t));
     1.6  
     1.7 -	MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length);
     1.8 +	MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length+1);
     1.9  
    1.10  	symbol = (void *)GetProcAddress((HMODULE)handle, name_t);
    1.11  	if ( symbol == NULL ) {