* Bug #14058 fixed - Scilab crashed with 'file("close", file())' instruction
+* Bug #14095 fixed - Scilab crashed when a .fig file was loaded with loadmatfile function.
+
Changes between version 5.5.2 and 6.0.0-alpha-1 of Scilab
=========================================================
pOut = new Cell(iRank, piDims);
matvar_t** allData = (matvar_t**)(matVariable->data);
- InternalType** ppIT = new InternalType*[matVariable->data_size];
- for (int i = 0; i < matVariable->data_size; i++)
+ int iSize = pOut->getAs<types::Cell>()->getSize();
+ InternalType** ppIT = new InternalType*[iSize];
+ for (int i = 0; i < iSize; i++)
{
ppIT[i] = CreateMatlabTreeVariable(allData[i]);
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Charlotte Hecquet
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- TEST WITH GRAPHIC -->
+// <-- Non-regression test for bug 14095 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14095
+//
+// <-- Short Description -->
+// Load a fig file with loadmatfile makes Scilab crash
+fig_file = fullfile(SCI,"modules","matio", "tests", "nonreg_tests", "bug_14095.fig");
+assert_checktrue(execstr("loadmatfile(""-mat"", fig_file)", "errcatch") == 0);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Charlotte Hecquet
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- TEST WITH GRAPHIC -->
+
+// <-- Non-regression test for bug 14095 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14095
+//
+// <-- Short Description -->
+// Load a fig file with loadmatfile makes Scilab crash
+fig_file = fullfile(SCI,"modules","matio", "tests", "nonreg_tests", "bug_14095.fig");
+assert_checktrue(execstr("loadmatfile(""-mat"", fig_file)", "errcatch") == 0);