From 25ce9bb5203ff5e53ce237580907693c75dc5925 Mon Sep 17 00:00:00 2001 From: "Lilith N." Date: Fri, 7 Mar 2025 19:31:06 +0100 Subject: [PATCH] Fix off by one error --- src/parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 75774d0..9c7c797 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -166,7 +166,7 @@ impl Ast { }, Ast::List(Localised { item, location }) => { println!("{} List ({}:{})", prefix_, location.line_start(), location.col_start()); - for i in 0..item.len()-2 { + for i in 0..item.len()-1 { item[i].pretty_print(Some(&(body_prefix_.to_owned() + &String::from(" ├─ "))), Some(&(body_prefix_.to_owned() + &String::from(" │ ")))); } item[item.len()-1].pretty_print(Some(&(body_prefix_.to_owned() + &String::from(" ╰─ "))), Some(&(body_prefix_.to_owned() + &String::from(" "))));