summaryrefslogtreecommitdiff
path: root/src/modules/chat/tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/chat/tools.cpp')
-rw-r--r--src/modules/chat/tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp
index 6f06421591..061555ccc4 100644
--- a/src/modules/chat/tools.cpp
+++ b/src/modules/chat/tools.cpp
@@ -463,7 +463,7 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce)
BOOL bFileJustCreated = !PathFileExists(si->pszLogFileName);
TCHAR tszFolder[MAX_PATH];
- _tcscpy(tszFolder, si->pszLogFileName);
+ _tcsncpy_s(tszFolder, si->pszLogFileName, _TRUNCATE);
PathRemoveFileSpec(tszFolder);
if (!PathIsDirectory(tszFolder))
CreateDirectoryTreeT(tszFolder);