Skip to content

Commit cc623cc

Browse files
committed
gtk4: Use correct length for the StrV when passing to C
C doesn't want the `NUL`-terminator to be counted. Fixes #1297
1 parent 2a1a4e4 commit cc623cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gtk4/src/constraint_layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl ConstraintLayout {
3636
let out = ffi::gtk_constraint_layout_add_constraints_from_descriptionv(
3737
self.to_glib_none().0,
3838
lines.as_ptr() as *const _,
39-
lines.len() as _,
39+
lines.len().saturating_sub(1) as _,
4040
hspacing,
4141
vspacing,
4242
hash_table,

0 commit comments

Comments
 (0)