fix extraction with $ after 6af9737ba40a4c6235d7dbecaee9b251b049eb12 67/18967/2
Antoine ELIAS [Thu, 26 Jan 2017 13:18:04 +0000 (14:18 +0100)]
Change-Id: Iaa6d2537e9c1859da2393e3ce52108cb791b44a7

scilab/modules/ast/src/cpp/types/types_tools.cpp

index e4d91f7..891aa53 100644 (file)
@@ -364,8 +364,9 @@ bool getImplicitIndex(GenericType* _pRef, typed_list* _pArgsIn, std::vector<int>
                 int sizeRef = viewAsVector ? _pRef->getSize() : pdims[i];
                 double start = evalute(pIL->getStart(), sizeRef);
                 double step = evalute(pIL->getStep(), sizeRef);
+                double end = evalute(pIL->getEnd(), sizeRef);
 
-                int size = pIL->getSize();
+                int size = (end - start) / step + 1;
                 if (size <= 0)
                 {
                     //manage implicit that return []