From 2a415ebdb99ee22bee9cbcc14abb591733e8f451 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Wed, 26 Nov 2025 11:10:15 -0500 Subject: [PATCH] Change explain indent count to saturating sub in cli/app.rs to prevent overflow --- cli/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/app.rs b/cli/app.rs index 81abfa972..272091563 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -883,13 +883,13 @@ impl Limbo { } match curr_insn { - "Next" | "SorterNext" | "Prev" => indent_count - 1, + "Next" | "SorterNext" | "Prev" => indent_count.saturating_sub(1), "Return" => { let matching_begin_subrtn = unclosed_begin_subrtns.iter().position(|b| b == p1); if let Some(matching_begin_subrtn) = matching_begin_subrtn { unclosed_begin_subrtns.remove(matching_begin_subrtn); - indent_count - 1 + indent_count.saturating_sub(1) } else { indent_count }