Fix core dump bug in tree path search

This commit is contained in:
Michael Mikovsky
2026-03-18 12:01:21 -06:00
parent 95d335a271
commit 512823585f
4 changed files with 49 additions and 114 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
use alloc::{boxed::Box, string::String, vec::Vec};
use crate::tree::request::{TreeRequest, TreeRequestType};
mod request;
pub use request::{TreeRequest, TreeRequestType};
pub mod types;
#[derive(Default)]
pub struct Tree {
endpoints: Vec<(Box<dyn Endpoint>, Vec<String>)>,
}
@@ -24,7 +25,7 @@ impl Tree {
return None;
}
for i in 0..search_path.len() {
for i in 0..endpoint_path.len() {
if search_path[i] != endpoint_path[i] {
return None;
}