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

Commit

Permalink
SDL_assertion messages use "\n" instead of "\r\n" on non-Windows plat…
Browse files Browse the repository at this point in the history
…forms.
  • Loading branch information
icculus committed Dec 16, 2012
1 parent e45148d commit e8f9662
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/SDL_assert.c
Expand Up @@ -126,6 +126,12 @@ static void SDL_AbortAssertion(void)
static SDL_assert_state
SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
{
#ifdef __WIN32__
#define ENDLINE "\r\n"
#else
#define ENDLINE "\n"
#endif

const char *envr;
SDL_assert_state state = SDL_ASSERTION_ABORT;
SDL_Window *window;
Expand All @@ -150,7 +156,8 @@ SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
return SDL_ASSERTION_ABORT;
}
SDL_snprintf(message, SDL_MAX_LOG_MESSAGE,
"Assertion failure at %s (%s:%d), triggered %u %s:\r\n '%s'",
"Assertion failure at %s (%s:%d), triggered %u %s:" ENDLINE
" '%s'",
data->function, data->filename, data->linenum,
data->trigger_count, (data->trigger_count == 1) ? "time" : "times",
data->condition);
Expand Down

0 comments on commit e8f9662

Please sign in to comment.