ILMAB: Field on geometry

Fix SetStringArray() which crashes SALOME if an input array of size 1 starts at 0.
This commit is contained in:
eap 2013-10-17 08:01:05 +00:00
parent 12c295f71d
commit 2f62ec8650

View File

@ -555,9 +555,9 @@ void GEOM_Function::SetStringArray(int thePosition, const Handle(TColStd_HArray1
if(thePosition <= 0 || theArray.IsNull()) return; if(thePosition <= 0 || theArray.IsNull()) return;
TDF_Label anArgLabel = ARGUMENT(thePosition); 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); anArray->ChangeArray(theArray);
anArgLabel.AddAttribute(anArray);
_isDone = true; _isDone = true;
} }