summaryrefslogtreecommitdiffstats
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 1b341a96e4..6b76aac162 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2526,20 +2526,21 @@ static bool dbg_skin_engine(void)
#if defined(HAVE_BOOTDATA) && !defined(SIMULATOR)
static bool dbg_boot_data(void)
{
- unsigned int crc = 0;
+ unsigned int crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff);
struct simplelist_info info;
info.scroll_all = true;
simplelist_info_init(&info, "Boot data", 1, NULL);
simplelist_set_line_count(0);
- crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff);
+
#if defined(HAVE_MULTIBOOT)
- char rootpath[VOL_MAX_LEN+2] = RB_ROOT_CONTENTS_DIR;
+ char rootpath[MAX_PATH / 2] = RB_ROOT_CONTENTS_DIR;
int boot_volume = 0;
if(crc == boot_data.crc)
{
boot_volume = boot_data.boot_volume; /* boot volume contained in uint8_t payload */
- get_redirect_dir(rootpath, sizeof(rootpath), boot_volume, "", "");
- rootpath[path_strip_trailing_separators(rootpath,NULL)] = '\0';
+ int rtlen = get_redirect_dir(rootpath, sizeof(rootpath), boot_volume, "", "");
+ while (rtlen > 0 && rootpath[--rtlen] == PATH_SEPCH) /* remove extra separators */
+ rootpath[rtlen] = '\0';
}
simplelist_addline("Boot Volume: <%lu>", boot_volume);
simplelist_addline("Root:");