Skip to content

Commit e381bf2

Browse files
committed
Fix for 0-sized case
1 parent 5824df1 commit e381bf2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lax/src/solveh.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ macro_rules! impl_bk_work {
5555
fn calc(&mut self, uplo: UPLO, a: &mut [Self::Elem]) -> Result<&[i32]> {
5656
let (n, _) = self.layout.size();
5757
let lwork = self.work.len().to_i32().unwrap();
58+
if lwork == 0 {
59+
return Ok(&[]);
60+
}
5861
let mut info = 0;
5962
unsafe {
6063
$trf(

0 commit comments

Comments
 (0)