1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030380: Exception while reading Step-file

Incorrect initialization of array (when upper bound is less than lower bound) has been avoided in some places.
This commit is contained in:
nbv
2018-11-20 16:34:27 +03:00
committed by apn
parent a2fb712bea
commit 0df4bbd689
24 changed files with 59 additions and 43 deletions

View File

@@ -87,7 +87,7 @@ void RWStepVisual_RWDraughtingModel::WriteStep (StepData_StepWriter& SW,
SW.Send (ent->StepRepr_Representation::Name());
SW.OpenSub();
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
SW.Send (Var0);
}
@@ -107,7 +107,7 @@ void RWStepVisual_RWDraughtingModel::Share (const Handle(StepVisual_DraughtingMo
// Inherited fields of Representation
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
iter.AddItem (Var0);
}