From 80ff833dd8ad011b579bff26ac654819e6735bce Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 25 Jul 2015 18:22:07 -0700 Subject: Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows). --- gen_arm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gen_arm.c') diff --git a/gen_arm.c b/gen_arm.c index 1534ee2..33eccaf 100644 --- a/gen_arm.c +++ b/gen_arm.c @@ -76,8 +76,7 @@ void check_alloc_code(code_info *code) size_t size = CODE_ALLOC_SIZE; uint32_t *next_code = alloc_code(&size); if (!next_code) { - fputs("Failed to allocate memory for generated code\n", stderr); - exit(1); + fatal_error("Failed to allocate memory for generated code\n"); } if (next_code = code->last + RESERVE_WORDS) { //new chunk is contiguous with the current one -- cgit v1.2.3