From 113e09db81654632fb794ed1945c019e89b729c6 Mon Sep 17 00:00:00 2001 From: camarasu <> Date: Wed, 23 May 2012 08:46:17 +0000 Subject: [PATCH] #1356 --- .../bbtkwxGUIEditorGraphicBBS.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index d9a00b9..94d6e54 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -462,16 +462,12 @@ void wxGUIEditorGraphicBBS::executeScript(std::string script) { //========================================================================= std::string wxGUIEditorGraphicBBS::CheckExtension(std::string filename, std::string extension) { - if(extension.size() != 4){ - printf("CheckExtension Warning! Extension size != 4\n"); - }else{ - if(filename.size() > 4){ - if( (filename.compare(filename.size()-4,4,extension)) !=0 ){ - filename.append(extension); - } - }else{ - filename.append(extension); + if(filename.size() > extension.size() ){ + if( (filename.compare(filename.size()-extension.size(), extension.size(),extension)) !=0 ){ + filename.append(extension); } + }else{ + filename.append(extension); } return filename; } -- 2.47.1