summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authormottelet <stephane.mottelet@utc.fr>2021-05-25 11:49:46 +0200
committerClément David <clement.david@esi-group.com>2021-06-02 12:05:02 +0200
commit90b4ecb9b57ac6ad4e00d4a99b0d8bd1a6424403 (patch)
treef72a3d2ac0bdd8da17fc962cccc568e292fee8af /scilab/modules
parent9a0e7c825837128b80d2831d87a8be7212732a19 (diff)
downloadscilab-90b4ecb9b57ac6ad4e00d4a99b0d8bd1a6424403.zip
scilab-90b4ecb9b57ac6ad4e00d4a99b0d8bd1a6424403.tar.gz
* Bug 16601 fixed: libmatio >= 1.5.18 was not supported
http://bugzilla.scilab.org/show_bug.cgi?id=16601 Change-Id: I1630a353a0ac46681334ebd1512b71eea4935cb6
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/matio/src/cpp/GetSparseVariable.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/scilab/modules/matio/src/cpp/GetSparseVariable.cpp b/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
index a867d5b..cf4b6ee 100644
--- a/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
+++ b/scilab/modules/matio/src/cpp/GetSparseVariable.cpp
@@ -65,7 +65,11 @@ matvar_t* GetSparseMatVar(types::Sparse* pSparse, const char *name)
65 int* itemsRow = new int[pSparse->getRows()]; 65 int* itemsRow = new int[pSparse->getRows()];
66 pSparse->getNbItemByRow(itemsRow); 66 pSparse->getNbItemByRow(itemsRow);
67 67
68 int* colIndexes = (int*)MALLOC(sizeof(int) * (pSparse->getRows() + 1)); 68#if MATIO_RELEASE_LEVEL < 18
69 mat_int32_t* colIndexes = (mat_int32_t*)MALLOC(sizeof(mat_int32_t) * (pSparse->getRows() + 1));
70#else
71 mat_uint32_t* colIndexes = (mat_uint32_t*)MALLOC(sizeof(mat_uint32_t) * (pSparse->getRows() + 1));
72#endif
69 if (colIndexes == NULL) 73 if (colIndexes == NULL)
70 { 74 {
71 FREE(sparseData); 75 FREE(sparseData);
@@ -82,7 +86,11 @@ matvar_t* GetSparseMatVar(types::Sparse* pSparse, const char *name)
82 colIndexes[K + 1] = colIndexes[K] + itemsRow[K]; 86 colIndexes[K + 1] = colIndexes[K] + itemsRow[K];
83 } 87 }
84 88
85 int* rowIndexes = (int*)MALLOC(sizeof(int) * nonZeros); 89#if MATIO_RELEASE_LEVEL < 18
90 mat_int32_t* rowIndexes = (mat_int32_t*)MALLOC(sizeof(mat_int32_t) * nonZeros);
91#else
92 mat_uint32_t* rowIndexes = (mat_uint32_t*)MALLOC(sizeof(mat_uint32_t) * nonZeros);
93#endif
86 if (rowIndexes == NULL) 94 if (rowIndexes == NULL)
87 { 95 {
88 FREE(sparseData); 96 FREE(sparseData);