diff --git a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp index 83d98c7f..7b3a5100 100644 --- a/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp +++ b/Sources/Plasma/PubUtilLib/plFile/plFileUtils.cpp @@ -64,6 +64,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include #include #include +#include #if HS_BUILD_FOR_WIN32 @@ -73,7 +74,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #if HS_BUILD_FOR_UNIX #include -#include #include #endif @@ -513,4 +513,4 @@ bool plFileUtils::GetSecureEncryptionKey(const wchar* filename, UInt32* key, uns return false; } -} \ No newline at end of file +} diff --git a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp index eaf41edd..c25fe6e5 100644 --- a/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp +++ b/Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp @@ -472,15 +472,15 @@ bool plStatusLog::IReOpen( void ) ext = L".elf"; #endif wchar fileToOpen[MAX_PATH]; - swprintf(fileToOpen, L"%s.0%s", fileNoExt, ext); + swprintf(fileToOpen, MAX_PATH, L"%s.0%s", fileNoExt, ext); if (!(fFlags & kDontRotateLogs)) { wchar work[MAX_PATH], work2[MAX_PATH]; - swprintf(work, L"%s.3%s",fileNoExt,ext); + swprintf(work, MAX_PATH, L"%s.3%s",fileNoExt,ext); _wremove(work); - swprintf(work2, L"%s.2%s",fileNoExt,ext); + swprintf(work2, MAX_PATH, L"%s.2%s",fileNoExt,ext); _wrename(work2, work); - swprintf(work, L"%s.1%s",fileNoExt,ext); + swprintf(work, MAX_PATH, L"%s.1%s",fileNoExt,ext); _wrename(work, work2); _wrename(fileToOpen, work); }