From 0521e2d017bebf8f8ae24313387f33c866453411 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 26 Nov 2008 14:23:50 -0600 Subject: *Update to Mangos 6849. Source: Mangos. --HG-- branch : trunk --- src/framework/Platform/Define.h | 2 ++ src/shared/Log.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/framework/Platform/Define.h b/src/framework/Platform/Define.h index 3c1b50ce21f..395245d3955 100644 --- a/src/framework/Platform/Define.h +++ b/src/framework/Platform/Define.h @@ -48,6 +48,7 @@ # define TRINITY_IMPORT __cdecl # define TRINITY_SCRIPT_EXT ".dll" # define TRINITY_SCRIPT_NAME "TrinityScript" +# define TRINITY_PATH_MAX MAX_PATH #else //PLATFORM != PLATFORM_WINDOWS # define TRINITY_LIBRARY_HANDLE void* # define TRINITY_EXPORT export @@ -61,6 +62,7 @@ # endif //__APPLE_CC__ && BIG_ENDIAN # define TRINITY_SCRIPT_EXT ".so" # define TRINITY_SCRIPT_NAME "libtrinityscript" +# define TRINITY_PATH_MAX PATH_MAX #endif //PLATFORM #if PLATFORM == PLATFORM_WINDOWS diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index c456348bf10..705b34d3cc7 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -273,8 +273,8 @@ FILE* Log::openGmlogPerAccount(uint32 account) if(m_gmlog_filename_format.empty()) return NULL; - char namebuf[200/*MAX_PATH*/]; - snprintf(namebuf,200/*MAX_PATH*/,m_gmlog_filename_format.c_str(),account); + char namebuf[TRINITY_PATH_MAX]; + snprintf(namebuf,TRINITY_PATH_MAX,m_gmlog_filename_format.c_str(),account); return fopen(namebuf, "a"); } -- cgit v1.2.3