From 790ae63a2a0229c7c35d03f27d4d7793f9870607 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Sun, 29 Dec 2019 02:15:23 +0800 Subject: [PATCH] Fix scroll of long mra names. --- menu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu.cpp b/menu.cpp index 6a86456..22c3685 100644 --- a/menu.cpp +++ b/menu.cpp @@ -4714,6 +4714,8 @@ void ScrollLongName(void) int max_len; len = strlen(flist_SelectedItem()->altname); // get name length + int rbf = (len > 4 && !strcasecmp(flist_SelectedItem()->altname + len - 4, ".rbf")); + if (flist_SelectedItem()->de.d_type == DT_REG) // if a file { len=CalculateFileNameLengthWithoutExtension(flist_SelectedItem()->altname,fs_pFileExt); @@ -4726,7 +4728,7 @@ void ScrollLongName(void) } // if we are in a core, we might need to resize for the fixed date string at the end - if (!cfg.rbf_hide_datecode && (fs_Options & SCANO_CORES)) + if (!cfg.rbf_hide_datecode && (fs_Options & SCANO_CORES) && rbf) { if (len > 9 && !strncmp(flist_SelectedItem()->altname + len - 9, "_20", 3)) {