Mercurial > hg > octave-nkf
diff src/DLD-FUNCTIONS/cellfun.cc @ 9683:5b3b9dcfd59c
fix crash in cellfun
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 01 Oct 2009 21:58:01 +0200 |
parents | c929f09457b7 |
children | c5ff5f858cfd |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/cellfun.cc +++ b/src/DLD-FUNCTIONS/cellfun.cc @@ -475,13 +475,12 @@ inputlist(j) = cinputs[j](0); } - k = inputs[0].numel (); - for (int j = 0; j < nargin; j++) { if (mask[j]) { fdims = inputs[j].dims (); + k = inputs[j].numel (); for (int i = j+1; i < nargin; i++) { if (mask[i] && inputs[i].dims () != fdims) @@ -490,6 +489,7 @@ goto cellfun_err; } } + break; } }