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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user