* [#14775](http://bugzilla.scilab.org/show_bug.cgi?id=14775): Loading empty (0 bytes) .sod File crashed scilab
* [#14808](http://bugzilla.scilab.org/show_bug.cgi?id=14808): E=[ 'A' 'B' 'C' 'D' 'E'] , E(0:0) Crash Scilab Console
* [#14821](http://bugzilla.scilab.org/show_bug.cgi?id=14821): `getio` function was missing. An error on the diary file opened has been corrected
+* [#14824](http://bugzilla.scilab.org/show_bug.cgi?id=14824): Incorrect error message with `mfprintf(fd, "%d", [])`.
* [#14839](http://bugzilla.scilab.org/show_bug.cgi?id=14839): `plot2d2` crashed Scilab.
* [#14887](http://bugzilla.scilab.org/show_bug.cgi?id=14887): For many graphic handle types, the display of the `.tag` value missed `".."` delimiters
* [#14909](http://bugzilla.scilab.org/show_bug.cgi?id=14909): getlongpathname and getshortpathname return values with "\" instead of "/"
wcsInput = pFileStr->get(0);
wcsStringToWrite = scilab_sprintf("mfprintf", wcsInput, in, &nbrOfLines, &iNewLine);
+ if (wcsStringToWrite == NULL)
+ {
+ return types::Function::Error;
+ }
+
if (isSTD)
{
for (int i = 0; i < nbrOfLines; i++)
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises - Adeline CARNIS
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 14824 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14824
+//
+// <-- Short Description -->
+// Incorrect error message with mfprintf(fd, "%d", [])
+fd = mopen('tmp.tmp', 'w');
+str = "mfprintf(fd, ""%d"", [])";
+assert_checkfalse(execstr(str ,"errcatch") == 0);
+refMsg = msprintf(_("%s: Wrong number of input arguments: data doesn''t fit with format.\n"), "mfprintf");
+assert_checkerror(str, refMsg);
+mclose(fd)
+ ans =
+ 0.
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises - Adeline CARNIS
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+//
+// <-- Non-regression test for bug 14824 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14824
+//
+// <-- Short Description -->
+// Incorrect error message with mfprintf(fd, "%d", [])
+
+fd = mopen('tmp.tmp', 'w');
+str = "mfprintf(fd, ""%d"", [])";
+assert_checkfalse(execstr(str ,"errcatch") == 0);
+refMsg = msprintf(_("%s: Wrong number of input arguments: data doesn''t fit with format.\n"), "mfprintf");
+assert_checkerror(str, refMsg);
+mclose(fd)