Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merged Bugzilla #354 fix into trunk.
  • Loading branch information
icculus committed Feb 3, 2007
1 parent 9ac4788 commit f9c2f22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loadso/dlopen/SDL_sysloadso.c
Expand Up @@ -47,11 +47,12 @@ SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = dlsym(handle, name);
if (symbol == NULL) {
/* append an underscore for platforms that need that. */
size_t len = 1 + SDL_strlen(name) + 1;
char *_name = SDL_stack_alloc(char, len);
_name[0] = '_';
SDL_strlcpy(&_name[1], name, len);
symbol = dlsym(handle, name);
symbol = dlsym(handle, _name);
SDL_stack_free(_name);
if (symbol == NULL) {
SDL_SetError("Failed loading %s: %s", name,
Expand Down

0 comments on commit f9c2f22

Please sign in to comment.