aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/framework/Platform/Define.h2
-rw-r--r--src/shared/Log.cpp4
2 files changed, 4 insertions, 2 deletions
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");
}