fix for vips_image_get_fields()

perhaps it'll work now
This commit is contained in:
John Cupitt 2017-03-25 17:10:52 +00:00
parent eb19321de1
commit edf513cf27
1 changed files with 2 additions and 1 deletions

View File

@ -1188,7 +1188,7 @@ count_fields( VipsImage *image, const char *field, GValue *value, void *a )
{
int *n_fields = (int *) a;
n_fields += 1;
*n_fields += 1;
return( NULL );
}
@ -1224,6 +1224,7 @@ vips_image_get_fields( VipsImage *image )
gchar **fields;
gchar **p;
n_fields = 0;
(void) vips_image_map( image, count_fields, &n_fields );
fields = g_new0( gchar *, n_fields + 1 );
p = fields;