mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-09 23:46:52 +08:00
0003513: There is no check for boundary of array in method Set for array attributes
- Added check of array's boundary in Set(i, val) methods. - Added comments to cdl files. - removed accidental modification in TDataStd_ExtStringArray::Value(i). - recovering accidentally lost modifications.
This commit is contained in:
@@ -110,13 +110,9 @@ Handle(TDataStd_BooleanArray) TDataStd_BooleanArray::Set(const TDF_Label&
|
||||
void TDataStd_BooleanArray::SetValue (const Standard_Integer index,
|
||||
const Standard_Boolean value)
|
||||
{
|
||||
#ifdef DEB
|
||||
if (myValues.IsNull())
|
||||
return;
|
||||
if (index < myLower || index > myUpper)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (myValues.IsNull())
|
||||
return;
|
||||
Standard_Integer byte_index = (index - myLower) >> 3;
|
||||
Standard_Integer degree = index - (byte_index << 3) - myLower;
|
||||
Standard_Integer byte_value = DegreeOf2(degree);
|
||||
|
||||
Reference in New Issue
Block a user