* Bug #13780 fixed - size with two input and output arguments must return an error.
[scilab.git] / scilab / modules / elementary_functions / sci_gateway / cpp / sci_size.cpp
index c156076..2b1aa1d 100644 (file)
@@ -89,6 +89,11 @@ Function::ReturnValue sci_size(types::typed_list &in, int _iRetCount, types::typ
 
             if (in.size() == 2)
             {
+                if (_iRetCount == 2)
+                {
+                    Scierror(999, _("%s: Wrong number of output argument(s): %d expected.\n"), "size", 1);
+                    return Function::Error;
+                }
                 iMode = getMode(in, 1, 0);
                 if (iMode == -2)
                 {