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

0027427: Exception on loading a DE package to Draw

This commit is contained in:
anv
2016-04-25 15:29:57 +03:00
parent 92788bf4bb
commit 3e64931da5
2 changed files with 5 additions and 5 deletions

View File

@@ -90,14 +90,14 @@ Standard_Integer Interface_Category::NbCategories()
Standard_CString Interface_Category::Name (const Standard_Integer theNum)
{
if (theNum < 0) return "";
if (theNum < 1 || theNum > theCats().Length()) return unspec;
if (theNum < theCats().Lower() || theNum > theCats().Upper()) return unspec;
return theCats().ChangeValue(theNum).ToCString();
}
Standard_Integer Interface_Category::Number (const Standard_CString theName)
{
Standard_Integer i, nb = theCats().Length();
for (i = 1; i <= nb; i ++) {
Standard_Integer i;
for (i = theCats().Lower(); i <= theCats().Upper(); i ++) {
if (theCats().ChangeValue(i).IsEqual(theName)) return i;
}
return 0;