mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
puzzles: clean up error messages
Expands buffer size, and prints to LOGF. Change-Id: I6dbcf60152d69c928270023c550976b802269d95
This commit is contained in:
parent
b67d9e9217
commit
d75131569c
2 changed files with 6 additions and 4 deletions
|
@ -8,6 +8,6 @@
|
|||
#define assert(p) ((void)0)
|
||||
#else
|
||||
|
||||
#define assert(e) ((e) ? (void)0 : fatal("assertion failed %s:%d", __FILE__, __LINE__))
|
||||
#define assert(e) ((e) ? (void)0 : fatal("assertion failed on %s line %d: " #e, __FILE__, __LINE__))
|
||||
|
||||
#endif /* NDEBUG */
|
||||
|
|
|
@ -1448,15 +1448,17 @@ const drawing_api rb_drawing = {
|
|||
void fatal(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char buf[256];
|
||||
|
||||
rb->splash(HZ, "FATAL");
|
||||
|
||||
va_start(ap, fmt);
|
||||
char buf[80];
|
||||
rb->vsnprintf(buf, 80, fmt, ap);
|
||||
rb->splash(HZ * 2, buf);
|
||||
rb->vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
LOGF("%s", buf);
|
||||
rb->splash(HZ * 2, buf);
|
||||
|
||||
if(rb->thread_self() == thread)
|
||||
rb->thread_exit();
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue