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

View File

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