diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-05-26 18:44:40 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:50 +0300 |
commit | 03317d74ca1fb3e7d41c65c19d32b97f299b9ff8 (patch) | |
tree | 7071f7754639f1715ec93df8256fcde7fdbef936 | |
parent | c6674a294df73aa916ef1fe77ef431d764be3abb (diff) |
melib: correct out of bounds access
-rw-r--r-- | melib/src/thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/melib/src/thread.rs b/melib/src/thread.rs index 7f682f9a..31b4403b 100644 --- a/melib/src/thread.rs +++ b/melib/src/thread.rs @@ -695,7 +695,7 @@ impl Threads { */ let mut c_idx = 0; loop { - if c_idx == thread_nodes[&idx].children.len() { + if c_idx >= thread_nodes[&idx].children.len() { break; } let c = thread_nodes[&idx].children[c_idx]; |