changeset 5539:622869530dff octave-forge

return sum even if no output argument
author schloegl
date Mon, 20 Apr 2009 14:28:51 +0000
parents 7479dafa5358
children 24c1b3483e1e
files extra/NaN/src/sumskipnan_mex.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/extra/NaN/src/sumskipnan_mex.cpp	Sat Apr 18 15:26:15 2009 +0000
+++ b/extra/NaN/src/sumskipnan_mex.cpp	Mon Apr 20 14:28:51 2009 +0000
@@ -135,7 +135,7 @@
 
 	mxFree(SZ2);
 
-	if ((POutputCount == 1) && !mxIsComplex(PInputs[0])) {
+	if ((POutputCount <= 1) && !mxIsComplex(PInputs[0])) {
 		// OUTER LOOP: along dimensions > DIM
 		for (l = 0; l<D3; l++) {
 			ix0 = l*D1; 	// index for output