Check if orientation is less than 1

This commit is contained in:
Andrii Dmytrenko 2020-01-06 11:30:27 +00:00
parent d0b69826cc
commit 9609f4f1d7

View File

@ -525,9 +525,8 @@ vips__exif_parse( VipsImage *image )
int orientation;
orientation = atoi( str );
if ( orientation < 0 || orientation > 8 ) {
if( orientation < 1 || orientation > 8 )
orientation = 1;
}
vips_image_set_int( image, VIPS_META_ORIENTATION, orientation );
}