octave-image (1.0.15-1) ismatrix-returns-true-on-string.patch

Summary

 inst/fftconv2.m   |    2 +-
 inst/stretchlim.m |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

Description: Take into account the new behavior of ismatrix
 In Octave 3.6, the behavior of ismatrix() has changed.  This functions
 returns now true for strings.  The code in stretchlim.m and fftconv2.m
 relied in the older behavior (returning false).
Author: Rafael Laboissiere <rafael@laboissiere.net>
Forwarded: http://permalink.gmane.org/gmane.comp.gnu.octave.devel/6913
Last-Update: 2012-03-11

Index: octave-image/inst/stretchlim.m
===================================================================
--- octave-image.orig/inst/stretchlim.m	2012-03-10 16:47:06.000000000 +0000
+++ octave-image/inst/stretchlim.m	2012-03-10 16:49:40.000000000 +0000
@@ -73,7 +73,7 @@
     usage("LOW_HIGH=stretchlim(I [, TOL]), LOW_HIGH=stretchlim(RGB [, TOL])");
   endif
   
-  if(!ismatrix(image))
+  if(!ismatrix(image) || ischar(image))
     error("stretchlim: image should be a matrix");
   endif
   

Index: octave-image/inst/fftconv2.m
===================================================================
--- octave-image-1.0.15.orig/inst/fftconv2.m
+++ octave-image-1.0.15/inst/fftconv2.m
@@ -44,7 +44,7 @@ function X = fftconv2(varargin)
     shape = "full";
     rowcolumn = 0;
     
-    if ((nargin > 2) && ismatrix(varargin{3}))
+    if ((nargin > 2) && ismatrix(varargin{3}) && !ischar(varargin{3}))
 	## usage: fftconv2(v1, v2, a[, shape])
 
 	rowcolumn = 1;