From d69c38f0ed79ed06a52a81baa283505218bfd74a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 16 Jan 2002 12:03:29 +0000 Subject: [PATCH] Changed hardwired char[1024] arrays to char[FILEUTILS_MAX_PATH_LENGTH] and defined the value to be 2048, this should avoid problems with path lengths which have been overflowing the 1024 limit (Sasa report this bug). The real solution is to use std::string throught FileUtils, but this will have to wait for another day. --- src/osgDB/FileUtils.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index 996898c4e..c7f00716e 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -41,6 +41,8 @@ inline static char* strdup(const char *src) #endif #endif +#define FILEUTILS_MAX_PATH_LENGTH 2048 + #if defined(WIN32) &&!defined(__CYGWIN__) char *PathDelimitor = ";"; static const char *s_default_file_path = ".;"; @@ -91,7 +93,7 @@ void osgDB::initFilePath( void ) void osgDB::setFilePath( const char *_path ) { - char buff[1024]; + char buff[FILEUTILS_MAX_PATH_LENGTH]; notify(DEBUG_INFO) << "In osgDB::setFilePath("<<_path<<")"<