We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 800

Summary: SDL-1.2.13 /** SDL_LoadFunction() **/ bug on Windows CE
Product: SDL Reporter: lx
Component: loadsoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.13   
Hardware: Other   
OS: Windows (CE)/PocketPC   

Description lx 2009-09-20 12:35:11 UTC
SDL-1.2.13
---------------------------------------------------------------------------------
src/loadso/win32/SDL_sysloadso.c
---------------------------------------------------------------------------------

void *SDL_LoadFunction(void *handle, const char *name)
{
        ...
#if defined(_WIN32_WCE)
       ....
	MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, name_t, length);

        // Line 97
        // name_t is not ends with '\0', so GetProcAddress(...name_t) failed always
        // add this line to FIX it
	name_t[length] = 0;

	symbol = (void *)GetProcAddress((HMODULE)handle, name_t);
        ...
}
Comment 1 Sam Lantinga 2009-09-21 04:42:09 UTC
This is already fixed for 1.2.14.  Thanks!