2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Convert the last remaining swprintf to the correct version

This commit is contained in:
2011-04-17 11:54:12 -07:00
parent c8cf53df80
commit 8573c02b46
2 changed files with 4 additions and 4 deletions

View File

@ -448,7 +448,7 @@ bool plStatusLog::IReOpen( void )
wchar file[ MAX_PATH ]; wchar file[ MAX_PATH ];
wchar fileNoExt[MAX_PATH]; wchar fileNoExt[MAX_PATH];
wchar* ext=nil; wchar* ext=nil;
IParseFileName(file, fileNoExt, &ext); IParseFileName(file, MAX_PATH, fileNoExt, &ext);
fEncryptMe = false; fEncryptMe = false;
#ifdef PLASMA_EXTERNAL_RELEASE #ifdef PLASMA_EXTERNAL_RELEASE
fEncryptMe = ( wcsicmp( fFilename.c_str(), L"chat.log" ) != 0 ) ? true : false; 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(); const wchar *base = plStatusLogMgr::IGetBasePath();
if( wcslen( base ) != nil ) 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 else
wcscpy( file, fFilename.c_str() ); wcscpy( file, fFilename.c_str() );

View File

@ -86,7 +86,7 @@ class plStatusLog
bool IAddLine( const char *line, Int32 count, UInt32 color ); bool IAddLine( const char *line, Int32 count, UInt32 color );
bool IPrintLineToFile( const char *line, UInt32 count ); 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 IInit( void );
void IFini( void ); void IFini( void );