From 2f62ec8650b794dc8cb6cf168940e3b817f71e11 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 17 Oct 2013 08:01:05 +0000 Subject: [PATCH] ILMAB: Field on geometry Fix SetStringArray() which crashes SALOME if an input array of size 1 starts at 0. --- src/GEOM/GEOM_Function.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index af73ba3f6..a6bf5ec0a 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -555,9 +555,9 @@ void GEOM_Function::SetStringArray(int thePosition, const Handle(TColStd_HArray1 if(thePosition <= 0 || theArray.IsNull()) return; TDF_Label anArgLabel = ARGUMENT(thePosition); - Handle(TDataStd_ExtStringArray) anArray = new TDataStd_ExtStringArray; + Handle(TDataStd_ExtStringArray) anArray = + TDataStd_ExtStringArray::Set(anArgLabel, theArray->Lower(), theArray->Upper()); anArray->ChangeArray(theArray); - anArgLabel.AddAttribute(anArray); _isDone = true; } -- 2.39.2