From: eap Date: Wed, 10 Aug 2011 10:27:45 +0000 (+0000) Subject: In StringToFunctorType(), return FT_Undefined for an invalid input X-Git-Tag: V6_4_0a1~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f1b9e57c558c431d05ce6a680917f00004250dea;p=modules%2Fsmesh.git In StringToFunctorType(), return FT_Undefined for an invalid input --- diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 8dd7ca4f0..1728f7dee 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -3811,8 +3811,8 @@ SMESH::FunctorType SMESH::StringToFunctorType(const char* str) { std::string name( str + 3 ); // skip "FT_" const char** functNames = getFunctNames(); - int ft = SMESH::FT_Undefined; - for ( ; ft >= 0; --ft ) + int ft = 0; + for ( ; ft < SMESH::FT_Undefined; ++ft ) if ( name == ( functNames[ft] + 3 )) break;