summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recovery.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 7ddc645..35c6830 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -936,7 +936,8 @@ static void choose_recovery_file(Device* device) {
while (true) {
int chosen_item = get_menu_selection(headers, entries, 1, 0, device);
- if (strcmp(entries[chosen_item], "Back") == 0) break;
+ if (chosen_item == Device::kGoBack) break;
+ if (chosen_item >= 0 && strcmp(entries[chosen_item], "Back") == 0) break;
ui->ShowFile(entries[chosen_item]);
}