Browse Source

Convert the last remaining swprintf to the correct version

Michael Hansen 14 years ago
parent
commit
8573c02b46
  1. 6
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp
  2. 2
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h

6
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

@ -448,7 +448,7 @@ bool plStatusLog::IReOpen( void )
wchar file[ MAX_PATH ];
wchar fileNoExt[MAX_PATH];
wchar* ext=nil;
IParseFileName(file, fileNoExt, &ext);
IParseFileName(file, MAX_PATH, fileNoExt, &ext);
fEncryptMe = false;
#ifdef PLASMA_EXTERNAL_RELEASE
fEncryptMe = ( wcsicmp( fFilename.c_str(), L"chat.log" ) != 0 ) ? true : false;
@ -513,11 +513,11 @@ void plStatusLog::IFini( void )
}
void plStatusLog::IParseFileName(wchar* file, wchar* fileNoExt, wchar** ext) const
void plStatusLog::IParseFileName(wchar* file, size_t fnsize, wchar* fileNoExt, wchar** ext) const
{
const wchar *base = plStatusLogMgr::IGetBasePath();
if( wcslen( base ) != nil )
swprintf( file, L"%s%s%s", base, WPATH_SEPARATOR_STR, fFilename.c_str() );
swprintf( file, fnsize, L"%s%s%s", base, WPATH_SEPARATOR_STR, fFilename.c_str() );
else
wcscpy( file, fFilename.c_str() );

2
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.h

@ -86,7 +86,7 @@ class plStatusLog
bool IAddLine( const char *line, Int32 count, UInt32 color );
bool IPrintLineToFile( const char *line, UInt32 count );
void IParseFileName(wchar* file, wchar* fileNoExt, wchar** ext) const;
void IParseFileName(wchar* file, size_t fnsize, wchar* fileNoExt, wchar** ext) const;
void IInit( void );
void IFini( void );

Loading…
Cancel
Save