take care of maxdim instead of number of index during creation by insertion 37/11337/3
Antoine ELIAS [Fri, 19 Apr 2013 09:54:28 +0000 (11:54 +0200)]
toto([2 2 2 2]) = 8;
toto == [0;8]//before was [0;8;0;0]

Change-Id: Ib82bdc95ac3eec274f65ed42d9243920d311176d

scilab/modules/types/includes/arrayof.hxx

index 5168d0a..b2f125f 100644 (file)
@@ -623,13 +623,13 @@ public :
         {
             if (pSource->getCols() == 1)
             {
-                int piRealDim[2] = {piCountDim[0], 1};
+                int piRealDim[2] = {piMaxDim[0], 1};
                 pOut = pSource->createEmpty(2, piRealDim, bComplex);
             }
             else
             {
                 //rows == 1
-                int piRealDim[2] = {1, piCountDim[0]};
+                int piRealDim[2] = {1, piMaxDim[0]};
                 pOut = pSource->createEmpty(2, piRealDim, bComplex);
             }
         }