diff options
Diffstat (limited to 'native/src/layout')
-rw-r--r-- | native/src/layout/flex.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/native/src/layout/flex.rs b/native/src/layout/flex.rs index 98cc344e..ec3e2d00 100644 --- a/native/src/layout/flex.rs +++ b/native/src/layout/flex.rs @@ -63,7 +63,8 @@ where { let limits = limits.pad(padding); - let mut total_non_fill = spacing as f32 * (children.len() - 1) as f32; + let mut total_non_fill = + spacing as f32 * (children.len() as i32 - 1).max(0) as f32; let mut fill_sum = 0; let mut nodes: Vec<Node> = Vec::with_capacity(children.len()); |