Mercurial > hg > octave-avbm
changeset 10282:c9780d8e228c
fix invalid checks in amd functions
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 09 Feb 2010 09:44:19 +0100 |
parents | 30078b201a2c |
children | b178769f31ca |
files | src/ChangeLog src/DLD-FUNCTIONS/ccolamd.cc src/DLD-FUNCTIONS/colamd.cc |
diffstat | 3 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-02-09 Jaroslav Hajek <highegg@gmail.com> + + * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd, Fetree): Fix improper arg + checks. + * DLD-FUNCTIONS/ccolamd.cc (Fccolamd, Fcsymamd): Likewise. + 2010-02-08 Jaroslav Hajek <highegg@gmail.com> * ov-re-mat.cc (octave_matrix::sort): Special-case sorting a known
--- a/src/DLD-FUNCTIONS/ccolamd.cc +++ b/src/DLD-FUNCTIONS/ccolamd.cc @@ -145,7 +145,7 @@ int nargin = args.length (); int spumoni = 0; - if (nargout < 0 || nargout > 2 || nargin < 0 || nargin > 3) + if (nargout > 2 || nargin < 1 || nargin > 3) usage ("ccolamd: incorrect number of input and/or output arguments"); else { @@ -400,7 +400,7 @@ int nargin = args.length (); int spumoni = 0; - if (nargout < 0 || nargout > 2 || nargin < 0 || nargin > 3) + if (nargout > 2 || nargin < 1 || nargin > 3) usage ("ccolamd: incorrect number of input and/or output arguments"); else {
--- a/src/DLD-FUNCTIONS/colamd.cc +++ b/src/DLD-FUNCTIONS/colamd.cc @@ -283,7 +283,7 @@ int nargin = args.length (); int spumoni = 0; - if (nargout < 0 || nargout > 2 || nargin < 0 || nargin > 2) + if (nargout > 2 || nargin < 1 || nargin > 2) print_usage (); else { @@ -519,7 +519,7 @@ int nargin = args.length (); int spumoni = 0; - if (nargout < 0 || nargout > 2 || nargin < 0 || nargin > 2) + if (nargout > 2 || nargin < 1 || nargin > 2) print_usage (); else { @@ -664,7 +664,7 @@ int nargin = args.length (); - if (nargout < 0 || nargout > 2 || nargin < 0 || nargin > 2) + if (nargout > 2 || nargin < 1 || nargin > 2) print_usage (); else {