]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
Bug #1719
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxVtkSceneManager.cxx
index b5e431c7c3816a5368d4ec88efde27a08bca5075..9b9c60a8b826890daf3ed879da402150402ea41f 100644 (file)
@@ -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());