Skip to content

Commit 8dd0510

Browse files
authored
Fix vips_isprefix() argument order (#4225)
The arguments were reversed, likely due to confusion with `g_str_has_prefix()`. Ensures all metadata is removed when saving with `keep=none`. See: #4224.
1 parent 6819735 commit 8dd0510

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libvips/foreign/foreign.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,8 +1722,8 @@ vips_foreign_save_remove_metadata(VipsImage *image,
17221722
VipsForeignKeep keep = *((VipsForeignKeep *) user_data);
17231723

17241724
// we are only interested in metadata
1725-
if (!vips_isprefix(field, "png-comment-") &&
1726-
!vips_isprefix(field, "magickprofile-") &&
1725+
if (!vips_isprefix("png-comment-", field) &&
1726+
!vips_isprefix("magickprofile-", field) &&
17271727
strcmp(field, VIPS_META_IMAGEDESCRIPTION) != 0 &&
17281728
!g_str_has_suffix(field, "-data"))
17291729
return NULL;

0 commit comments

Comments
 (0)