X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxVtkSceneManager.cxx;h=9b9c60a8b826890daf3ed879da402150402ea41f;hb=8e6a4acb50187deb9c88d79d1a1b5d548afdb45a;hp=b5e431c7c3816a5368d4ec88efde27a08bca5075;hpb=0209f53d6a0dbefceb3610b8d074e8fc4dcaba33;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index b5e431c..9b9c60a 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -40,6 +40,8 @@ namespace bbtk { +#define POORT_MAX_LINE_SIZE_INTERPRETER 1500 + //========================================================================= // EED 15 oct 2012 wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView, int idManager,Factory::Pointer bbtkfactory) @@ -1855,8 +1857,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) std::string line = ""; char delims[] = ":"; char *result = NULL; - int MAX_LINE_SIZE=1500; - char poort[MAX_LINE_SIZE]; + char poort[POORT_MAX_LINE_SIZE_INTERPRETER]; getCleanLine(inputStream, line); @@ -2196,9 +2197,9 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) while (port == "PORT") { getCleanLine(inputStream, line);//name:value - if (line.length()>=MAX_LINE_SIZE-1) + if (line.length()>=POORT_MAX_LINE_SIZE_INTERPRETER-1) { - line=line.substr(0, MAX_LINE_SIZE-1); + line=line.substr(0, POORT_MAX_LINE_SIZE_INTERPRETER-1); } strcpy(poort, line.c_str());