mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 09:11:27 +01:00
add SIGSEGV signal handler... because ponies.
This commit is contained in:
parent
0ec111c197
commit
c7a3f3d007
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
#include <math.h>
|
||||
#include <getopt.h>
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
#include "menu.h"
|
||||
#include "loading.h"
|
||||
#include "about.h"
|
||||
|
@ -311,7 +312,15 @@ void Shared_Unload(struct Game *game) {
|
|||
al_destroy_bitmap(game->console);
|
||||
}
|
||||
|
||||
void derp(int sig) {
|
||||
write(STDERR_FILENO, "Segmentation fault\n", 19);
|
||||
write(STDERR_FILENO, "I just don't know what went wrong!\n", 35);
|
||||
abort();
|
||||
}
|
||||
|
||||
int main(int argc, char **argv){
|
||||
signal(SIGSEGV, derp);
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
al_set_org_name("Super Derpy");
|
||||
|
|
Loading…
Add table
Reference in a new issue