Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SFileGetFileInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ bool WINAPI SFileGetFileName(HANDLE hFile, char * szFileName)
// Copy the file name to the output buffer, if any
if(pFileEntry->szFileName && szFileName)
{
strcpy(szFileName, pFileEntry->szFileName);
StringCopy(szFileName, MAX_PATH, pFileEntry->szFileName);
dwErrCode = ERROR_SUCCESS;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/StormLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ bool WINAPI SFileCloseFile(HANDLE hFile);

// Retrieving info about a file in the archive
bool WINAPI SFileGetFileInfo(HANDLE hMpqOrFile, SFileInfoClass InfoClass, void * pvFileInfo, DWORD cbFileInfo, LPDWORD pcbLengthNeeded);
bool WINAPI SFileGetFileName(HANDLE hFile, char * szFileName);
bool WINAPI SFileGetFileName(HANDLE hFile, char * szFileName); // szFileName must be at least MAX_PATH chars
bool WINAPI SFileFreeFileInfo(void * pvFileInfo, SFileInfoClass InfoClass);

// High-level extract function
Expand Down