From e3196446fa32fd2f5dd9662adabac29539400ad0 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sun, 11 Aug 2024 14:56:10 +0200 Subject: [PATCH] Fix crash in ctrl_to_symbol Array starts at 0, goes up to 27, that's 28 entries... *BUT* we also need the catch-all entry after, so it's 29. To be honest there's got to be a better way to write this. --- src/key.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/key.rs b/src/key.rs index 925dd6c1b..086f5e869 100644 --- a/src/key.rs +++ b/src/key.rs @@ -418,7 +418,7 @@ fn ctrl_to_symbol(buf: &mut WString, c: char) { // 2. key names that are given as raw escape sequence (\e123); those we want to display // similar to how they are given. - let ctrl_symbolic_names: [&wstr; 28] = { + let ctrl_symbolic_names: [&wstr; 29] = { std::array::from_fn(|i| match i { 8 => L!("\\b"), 9 => L!("\\t"),