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

Commit

Permalink
While you can actually write to the error buffer, conceptually it's r…
Browse files Browse the repository at this point in the history
…ead-only.
  • Loading branch information
slouken committed Aug 29, 2010
1 parent 28304ee commit 9a1c2af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/SDL_error.h
Expand Up @@ -41,7 +41,7 @@ extern "C" {

/* Public functions */
extern DECLSPEC void SDLCALL SDL_SetError(const char *fmt, ...);
extern DECLSPEC char *SDLCALL SDL_GetError(void);
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
extern DECLSPEC void SDLCALL SDL_ClearError(void);

/**
Expand Down
4 changes: 2 additions & 2 deletions src/SDL_error.c
Expand Up @@ -198,12 +198,12 @@ SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
}

/* Available for backwards compatibility */
char *
const char *
SDL_GetError(void)
{
static char errmsg[SDL_ERRBUFIZE];

return ((char *) SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE));
return SDL_GetErrorMsg(errmsg, SDL_ERRBUFIZE);
}

void
Expand Down

0 comments on commit 9a1c2af

Please sign in to comment.