vector whoops

This commit is contained in:
John Cupitt 2009-09-22 12:44:43 +00:00
parent 6f7a5794c9
commit 0b94dc67bd
2 changed files with 2 additions and 2 deletions

View File

@ -322,7 +322,7 @@ lintranv_gen( PEL *in, PEL *out, int width, IMAGE *im, LintraInfo *inf )
* all image bands. If the arrays have more than one element and they have
* the same number of elements as there are bands in the image, then
* one array element is used for each band. If the arrays have more than one
* element and the image only has a single band, the result is a many-bband
* element and the image only has a single band, the result is a many-band
* image where each band corresponds to one array element.
*
* See also: im_add(), im_lintra().

View File

@ -477,7 +477,7 @@ im_check_format( const char *domain, IMAGE *im1, IMAGE *im2 )
int
im_check_vector( const char *domain, int n, IMAGE *im )
{
if( n != 1 && n != im->Bands ) {
if( n != 1 && im->Bands != 1 && n != im->Bands ) {
im_error( domain,
_( "vector must have 1 or %d elements" ), im->Bands );
return( -1 );