forked from meli/meli
1
Fork 0

melib/shellexpand: fix infinite loop bug

Introduced in recent "fixing clippy lints" commit
master
Manos Pitsidianakis 2023-07-03 09:52:03 +03:00
parent ba7f5dce1c
commit 1dc1d86848
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
1 changed files with 3 additions and 3 deletions

View File

@ -131,11 +131,11 @@ impl ShellExpandTrait for Path {
};
let Ok(n) = usize::try_from(n) else {
if n == 0 {
break;
}
return SmallVec::new();
};
if n == 0 {
break;
}
unsafe {
buf.set_len(n);
}