1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-23 15:55:47 +00:00
oot/src/boot/assert.c

11 lines
376 B
C
Raw Normal View History

#include "global.h"
#include "fault.h"
2020-03-17 00:31:30 -04:00
NORETURN void __assert(const char* assertion, const char* file, int line) {
2020-03-17 00:31:30 -04:00
char msg[256];
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", assertion, file, line, osGetThreadId(NULL));
2020-03-17 00:31:30 -04:00
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
Fault_AddHungupAndCrashImpl(msg, assertion);
2020-03-17 00:31:30 -04:00
}