Skip to content

Commit

Permalink
Fix Image_compare_channel to raise ArgumentError when one of the
Browse files Browse the repository at this point in the history
3rd or subsequent arguments is not a ChannelType.
  • Loading branch information
rmagick committed Aug 14, 2005
1 parent 5387c7d commit cd080ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/RMagick/rmimage.c
@@ -1,4 +1,4 @@
/* $Id: rmimage.c,v 1.105 2005/08/13 23:03:59 rmagick Exp $ */
/* $Id: rmimage.c,v 1.106 2005/08/14 20:27:19 rmagick Exp $ */
/*============================================================================\
| Copyright (C) 2005 by Timothy P. Hunter
| Name: rmimage.c
Expand Down Expand Up @@ -789,7 +789,7 @@ VALUE Image_compare_channel(
ExceptionInfo exception;

channels = extract_channels(&argc, argv);
if (argc < 2)
if (argc != 2)
{
rb_raise(rb_eArgError, "wrong number of arguments (%d for 2 or more)", argc);
}
Expand Down

0 comments on commit cd080ac

Please sign in to comment.