From f1b9e57c558c431d05ce6a680917f00004250dea Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 10 Aug 2011 10:27:45 +0000 Subject: [PATCH] In StringToFunctorType(), return FT_Undefined for an invalid input --- src/SMESH_I/SMESH_Filter_i.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2