From 63858bbe1c281bf4e150f3f30242502c2bd21d38 Mon Sep 17 00:00:00 2001 From: Martin Neururer Date: Wed, 1 Feb 2017 15:11:47 +0100 Subject: [PATCH] Small correction ... --- mex-wholebodymodel/library/src/modelstate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mex-wholebodymodel/library/src/modelstate.cpp b/mex-wholebodymodel/library/src/modelstate.cpp index 0719286..6cb809b 100644 --- a/mex-wholebodymodel/library/src/modelstate.cpp +++ b/mex-wholebodymodel/library/src/modelstate.cpp @@ -56,7 +56,8 @@ bool isRobotNameAFile(const char *pstrRobotName) if (pos != std::string::npos) { // if '.' was found ... std::string ext = fn.substr(pos+1, len - pos); - if (ext.size() > 2) { + len = ext.size(); + if ( (len > 2) && (len < 5) ) { return true; } }