Skip to content

Commit

Permalink
Fix an off by one error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimver committed Oct 25, 2018
1 parent cd199af commit 980a8b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn to_text_box(lines: Vec<&str>, width: usize) -> String {
// Process middle lines
let middle_lines = &lines[1..lines.len() - 1];
let mut between: String = String::from("");
if middle_lines.len() > 1 {
if middle_lines.len() >= 1 {
for middle_line in middle_lines {
between.push_str(&format!("| {: <1$}|\n", middle_line, width + 1));
}
Expand Down

0 comments on commit 980a8b7

Please sign in to comment.