aboutsummaryrefslogtreecommitdiff
path: root/src/SFileListFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFileListFile.cpp')
-rw-r--r--src/SFileListFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp
index 7919475..e47a9ea 100644
--- a/src/SFileListFile.cpp
+++ b/src/SFileListFile.cpp
@@ -543,7 +543,7 @@ static bool DoListFileSearch(TListFileCache * pCache, SFILE_FIND_DATA * lpFindFi
if(nLength != 0 && CheckWildCard(szFileName, pCache->szWildCard))
{
if(nLength >= sizeof(lpFindFileData->cFileName))
- nLength = sizeof(lpFindFileData->cFileName);
+ nLength = sizeof(lpFindFileData->cFileName) - 1;
memcpy(lpFindFileData->cFileName, szFileName, nLength);
lpFindFileData->cFileName[nLength] = 0;