Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0022098: EDF 2036 SMESH: Create groups from none conected parts of a mesh
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_NoteBook.cxx
diff --git
a/src/SMESH_I/SMESH_NoteBook.cxx
b/src/SMESH_I/SMESH_NoteBook.cxx
index 0168a96e7ef3db68b9eec1e9cc5ffefeeece906c..a482d86ed2db2260982111d8db8d182b7e34bea8 100644
(file)
--- a/
src/SMESH_I/SMESH_NoteBook.cxx
+++ b/
src/SMESH_I/SMESH_NoteBook.cxx
@@
-258,10
+258,12
@@
void SMESH_NoteBook::ReplaceVariables()
// Get the entry of object storing "StringAttribute"
TCollection_AsciiString & cmdStr = aCmd->GetString();
TEntry2VarVecMap::iterator ent2varVec;
// Get the entry of object storing "StringAttribute"
TCollection_AsciiString & cmdStr = aCmd->GetString();
TEntry2VarVecMap::iterator ent2varVec;
- if (int pos = cmdStr.Location( SMESH::TVar::ObjPrefix(), 6, cmdStr.Length() ))
+ Standard_Integer fromIndex = 6;
+ Standard_Integer cmdLen = cmdStr.Length();
+ if ( int pos = (fromIndex <= cmdLen) ? cmdStr.Location( SMESH::TVar::ObjPrefix(), fromIndex, cmdLen ) : 0 )
{
TCollection_AsciiString varHolderEntry =
{
TCollection_AsciiString varHolderEntry =
- cmdStr.SubString( pos + strlen( SMESH::TVar::ObjPrefix() ), cmd
Str.Length()
);
+ cmdStr.SubString( pos + strlen( SMESH::TVar::ObjPrefix() ), cmd
Len
);
ent2varVec = _entry2VarsMap.find( varHolderEntry );
cmdStr.Split( pos - 1 );
}
ent2varVec = _entry2VarsMap.find( varHolderEntry );
cmdStr.Split( pos - 1 );
}