From cd1b215579847929b0fcecdefd3a5110181cc5da Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 16 Jul 2012 14:09:03 +0100 Subject: [PATCH] vips8 more/moreeq were broken The code to swap the args and use less instead was wrong. --- libvips/arithmetic/relational.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libvips/arithmetic/relational.c b/libvips/arithmetic/relational.c index 10da5b4d..14bbbae4 100644 --- a/libvips/arithmetic/relational.c +++ b/libvips/arithmetic/relational.c @@ -28,6 +28,8 @@ * - redone as a class * 1/2/12 * - complex ==, != were broken + * 16/7/12 + * - im1 > im2, im1 >= im2 were broken */ /* @@ -88,18 +90,16 @@ static int vips_relational_build( VipsObject *object ) { VipsRelational *relational = (VipsRelational *) object; - VipsArithmetic *arithmetic = (VipsArithmetic *) object; + VipsBinary *binary = (VipsBinary *) object; if( relational->relational == VIPS_OPERATION_RELATIONAL_MORE ) { relational->relational = VIPS_OPERATION_RELATIONAL_LESS; - VIPS_SWAP( VipsImage *, - arithmetic->ready[0], arithmetic->ready[1] ); + VIPS_SWAP( VipsImage *, binary->left, binary->right ); } if( relational->relational == VIPS_OPERATION_RELATIONAL_MOREEQ ) { relational->relational = VIPS_OPERATION_RELATIONAL_LESSEQ; - VIPS_SWAP( VipsImage *, - arithmetic->ready[0], arithmetic->ready[1] ); + VIPS_SWAP( VipsImage *, binary->left, binary->right ); } if( VIPS_OBJECT_CLASS( vips_relational_parent_class )->build( object ) )