Skip to content

Commit 9e632e5

Browse files
committed
glib: Fix pointer signedness
1 parent d428467 commit 9e632e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glib/src/gstring.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl GStr {
151151
if ffi::g_utf8_validate(ptr as *const _, -1, &mut end_ptr) != ffi::GFALSE {
152152
Some(Self::from_utf8_with_nul_unchecked(slice::from_raw_parts(
153153
ptr as *const u8,
154-
end_ptr.offset_from(ptr) as usize + 1,
154+
end_ptr.offset_from(ptr as *const u8) as usize + 1,
155155
)))
156156
} else {
157157
None

0 commit comments

Comments
 (0)