summaryrefslogtreecommitdiffstats
path: root/scilab/modules/api_scilab
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-04-16 11:47:18 +0200
committerAllan CORNET <allan.cornet@scilab.org>2010-04-16 11:51:16 +0200
commit2299773e47f5e0ae35db5875ce7e2edf14ac7fc3 (patch)
tree4abdc747842ccb6a237738e1c91940aa26ad0848 /scilab/modules/api_scilab
parent9340726d0b5ec9b4b911f8b5e4b9a5197f2093cd (diff)
downloadscilab-2299773e47f5e0ae35db5875ce7e2edf14ac7fc3.zip
scilab-2299773e47f5e0ae35db5875ce7e2edf14ac7fc3.tar.gz
createEmptyMatrix did not return []
Change-Id: I8d111418671526c61d54651fa14065d4758858ff
Diffstat (limited to 'scilab/modules/api_scilab')
-rw-r--r--scilab/modules/api_scilab/src/cpp/api_common.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scilab/modules/api_scilab/src/cpp/api_common.cpp b/scilab/modules/api_scilab/src/cpp/api_common.cpp
index ee9129d..21677a3 100644
--- a/scilab/modules/api_scilab/src/cpp/api_common.cpp
+++ b/scilab/modules/api_scilab/src/cpp/api_common.cpp
@@ -969,9 +969,9 @@ int isNamedEmptyMatrix(void* _pvCtx, char* _pstName)
969int createEmptyMatrix(void* _pvCtx, int _iVar) 969int createEmptyMatrix(void* _pvCtx, int _iVar)
970{ 970{
971 SciErr sciErr; 971 SciErr sciErr;
972 double dblReal = 1; 972 double dblReal = 0;
973 973
974 sciErr = createMatrixOfDouble(_pvCtx, _iVar, -1, -1, &dblReal); 974 sciErr = createMatrixOfDouble(_pvCtx, _iVar, 0, 0, &dblReal);
975 if(sciErr.iErr) 975 if(sciErr.iErr)
976 { 976 {
977 addErrorMessage(&sciErr, API_ERROR_CREATE_EMPTY_MATRIX, _("%s: Unable to create variable in Scilab memory"), "createEmptyMatrix"); 977 addErrorMessage(&sciErr, API_ERROR_CREATE_EMPTY_MATRIX, _("%s: Unable to create variable in Scilab memory"), "createEmptyMatrix");
@@ -985,9 +985,9 @@ int createEmptyMatrix(void* _pvCtx, int _iVar)
985int createNamedEmptyMatrix(void* _pvCtx, char *_pstName) 985int createNamedEmptyMatrix(void* _pvCtx, char *_pstName)
986{ 986{
987 SciErr sciErr; 987 SciErr sciErr;
988 double dblOne = 1; 988 double dblOne = 0;
989 989
990 sciErr = createNamedMatrixOfDouble(_pvCtx, _pstName, -1, -1, &dblOne); 990 sciErr = createNamedMatrixOfDouble(_pvCtx, _pstName, 0, 0, &dblOne);
991 if(sciErr.iErr) 991 if(sciErr.iErr)
992 { 992 {
993 addErrorMessage(&sciErr, API_ERROR_CREATE_NAMED_EMPTY_MATRIX, _("%s: Unable to create variable in Scilab memory"), "createNamedEmptyMatrix"); 993 addErrorMessage(&sciErr, API_ERROR_CREATE_NAMED_EMPTY_MATRIX, _("%s: Unable to create variable in Scilab memory"), "createNamedEmptyMatrix");