Skip to content

Commit a874534

Browse files
committed
Use SDL_abort when encountering a internal fatal SDL_assertion error
1 parent d246a58 commit a874534

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/SDL_assert.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,14 @@ static void SDL_GenerateAssertionReport(void)
120120
}
121121
}
122122

123-
/* This is not declared in any header, although it is shared between some
124-
parts of SDL, because we don't want anything calling it without an
125-
extremely good reason. */
126-
#ifdef __WATCOMC__
127-
extern void SDL_ExitProcess(int exitcode);
128-
#pragma aux SDL_ExitProcess aborts;
129-
#endif
130-
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
131-
132123
#ifdef __WATCOMC__
133124
static void SDL_AbortAssertion(void);
134125
#pragma aux SDL_AbortAssertion aborts;
135126
#endif
136127
static SDL_NORETURN void SDL_AbortAssertion(void)
137128
{
138129
SDL_Quit();
139-
SDL_ExitProcess(42);
130+
SDL_abort();
140131
}
141132

142133
static SDL_AssertState SDLCALL SDL_PromptAssertion(const SDL_AssertData *data, void *userdata)
@@ -361,7 +352,7 @@ SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data, const char *func, cons
361352
if (assertion_running == 2) {
362353
SDL_AbortAssertion();
363354
} else if (assertion_running == 3) { // Abort asserted!
364-
SDL_ExitProcess(42);
355+
SDL_abort();
365356
} else {
366357
while (1) { // do nothing but spin; what else can you do?!
367358
}

0 commit comments

Comments
 (0)