From 791340cc6b8af20c4c460eef1d0c15d37d5f21f0 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Wed, 11 Dec 2024 22:23:35 +0100 Subject: [PATCH] fix(core): restore RSOD info [no changelog] --- core/embed/util/rsod/rsod.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/core/embed/util/rsod/rsod.c b/core/embed/util/rsod/rsod.c index e802933416..da0196d76e 100644 --- a/core/embed/util/rsod/rsod.c +++ b/core/embed/util/rsod/rsod.c @@ -57,9 +57,15 @@ void rsod_terminal(const systask_postmortem_t* pminfo) { message = message_buf; break; case TASK_TERM_REASON_ERROR: - title = pminfo->error.title; - message = pminfo->error.message; - footer = pminfo->error.footer; + if (pminfo->error.title[0] != '\0') { + title = pminfo->error.title; + } + if (pminfo->error.message[0] != '\0') { + message = pminfo->error.message; + } + if (pminfo->error.footer[0] != '\0') { + footer = pminfo->error.footer; + } break; case TASK_TERM_REASON_FATAL: message = pminfo->fatal.expr; @@ -116,9 +122,15 @@ void rsod_gui(const systask_postmortem_t* pminfo) { break; case TASK_TERM_REASON_ERROR: - title = pminfo->error.title; - message = pminfo->error.message; - footer = pminfo->error.footer; + if (pminfo->error.title[0] != '\0') { + title = pminfo->error.title; + } + if (pminfo->error.message[0] != '\0') { + message = pminfo->error.message; + } + if (pminfo->error.footer[0] != '\0') { + footer = pminfo->error.footer; + } break; case TASK_TERM_REASON_FATAL: