Skip to content

Commit

Permalink
Merge pull request #1298 from sdroege/add-constraints-from-descriptio…
Browse files Browse the repository at this point in the history
…n-len

gtk4: Use correct length for the `StrV` when passing to C
  • Loading branch information
sdroege committed Feb 10, 2023
2 parents 5db45ce + 6d19e11 commit 6cfb451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtk4/src/constraint_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl ConstraintLayout {
let out = ffi::gtk_constraint_layout_add_constraints_from_descriptionv(
self.to_glib_none().0,
lines.as_ptr() as *const _,
lines.len() as _,
lines.len().saturating_sub(1) as _,
hspacing,
vspacing,
hash_table,
Expand Down

0 comments on commit 6cfb451

Please sign in to comment.