Skip to content

Commit

Permalink
Fixed crash with SDL_SetError(NULL)
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 8, 2014
1 parent 0ddd252 commit 4053844
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stdlib/SDL_string.c
Expand Up @@ -1468,6 +1468,9 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt,
size_t left = maxlen;
char *textstart = text;

if (!fmt) {
fmt = "";
}
while (*fmt) {
if (*fmt == '%') {
SDL_bool done = SDL_FALSE;
Expand Down

0 comments on commit 4053844

Please sign in to comment.